The Point2D class defines a point representing a location in (x,y) coordinate space.
This class is only the abstract superclass for all objects that store a 2D coordinate. The actual storage representation of the coordinates is left to the subclass.
The Point2D class defines a point representing a location in (x,y) coordinate space. This class is only the abstract superclass for all objects that store a 2D coordinate. The actual storage representation of the coordinates is left to the subclass.
(*distance x-1 y-1 x-2 y-2)
Returns the distance between two points.
x-1 - the X coordinate of the first specified point - double
y-1 - the Y coordinate of the first specified point - double
x-2 - the X coordinate of the second specified point - double
y-2 - the Y coordinate of the second specified point - double
returns: the distance between the two sets of specified
coordinates. - double
Returns the distance between two points. x-1 - the X coordinate of the first specified point - `double` y-1 - the Y coordinate of the first specified point - `double` x-2 - the X coordinate of the second specified point - `double` y-2 - the Y coordinate of the second specified point - `double` returns: the distance between the two sets of specified coordinates. - `double`
(*distance-sq x-1 y-1 x-2 y-2)
Returns the square of the distance between two points.
x-1 - the X coordinate of the first specified point - double
y-1 - the Y coordinate of the first specified point - double
x-2 - the X coordinate of the second specified point - double
y-2 - the Y coordinate of the second specified point - double
returns: the square of the distance between the two
sets of specified coordinates. - double
Returns the square of the distance between two points. x-1 - the X coordinate of the first specified point - `double` y-1 - the Y coordinate of the first specified point - `double` x-2 - the X coordinate of the second specified point - `double` y-2 - the Y coordinate of the second specified point - `double` returns: the square of the distance between the two sets of specified coordinates. - `double`
(clone this)
Creates a new object of the same class and with the same contents as this object.
returns: a clone of this instance. - java.lang.Object
throws: java.lang.OutOfMemoryError - if there is not enough memory.
Creates a new object of the same class and with the same contents as this object. returns: a clone of this instance. - `java.lang.Object` throws: java.lang.OutOfMemoryError - if there is not enough memory.
(distance this pt)
(distance this px py)
Returns the distance from this Point2D to a specified point.
px - the X coordinate of the specified point to be measured against this Point2D - double
py - the Y coordinate of the specified point to be measured against this Point2D - double
returns: the distance between this Point2D
and a specified point. - double
Returns the distance from this Point2D to a specified point. px - the X coordinate of the specified point to be measured against this Point2D - `double` py - the Y coordinate of the specified point to be measured against this Point2D - `double` returns: the distance between this Point2D and a specified point. - `double`
(distance-sq this pt)
(distance-sq this px py)
Returns the square of the distance from this Point2D to a specified point.
px - the X coordinate of the specified point to be measured against this Point2D - double
py - the Y coordinate of the specified point to be measured against this Point2D - double
returns: the square of the distance between this
Point2D and the specified point. - double
Returns the square of the distance from this Point2D to a specified point. px - the X coordinate of the specified point to be measured against this Point2D - `double` py - the Y coordinate of the specified point to be measured against this Point2D - `double` returns: the square of the distance between this Point2D and the specified point. - `double`
(equals this obj)
Determines whether or not two points are equal. Two instances of Point2D are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same.
obj - an object to be compared with this Point2D - java.lang.Object
returns: true if the object to be compared is
an instance of Point2D and has
the same values; false otherwise. - boolean
Determines whether or not two points are equal. Two instances of Point2D are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same. obj - an object to be compared with this Point2D - `java.lang.Object` returns: true if the object to be compared is an instance of Point2D and has the same values; false otherwise. - `boolean`
(get-x this)
Returns the X coordinate of this Point2D in double precision.
returns: the X coordinate of this Point2D. - double
Returns the X coordinate of this Point2D in double precision. returns: the X coordinate of this Point2D. - `double`
(get-y this)
Returns the Y coordinate of this Point2D in double precision.
returns: the Y coordinate of this Point2D. - double
Returns the Y coordinate of this Point2D in double precision. returns: the Y coordinate of this Point2D. - `double`
(hash-code this)
Returns the hashcode for this Point2D.
returns: a hash code for this Point2D. - int
Returns the hashcode for this Point2D. returns: a hash code for this Point2D. - `int`
(set-location this p)
(set-location this x y)
Sets the location of this Point2D to the specified double coordinates.
x - the new X coordinate of this Point2D - double
y - the new Y coordinate of this Point2D - double
Sets the location of this Point2D to the specified double coordinates. x - the new X coordinate of this Point2D - `double` y - the new Y coordinate of this Point2D - `double`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close