Package | com.yworks.bridge.geom |
Class | public class Point2D |
Inheritance | Point2D YObject Object |
Implements | Clonable |
Subclasses | Point2DDouble |
Property | Defined By | ||
---|---|---|---|
location : Point2D [write-only]
Sets the location of this Point2D to the same coordinates as the specified Point2D object. | Point2D | ||
x : Number [read-only]
Returns the X coordinate of this Point2D in double precision. | Point2D | ||
y : Number [read-only]
Returns the Y coordinate of this Point2D in double precision. | Point2D |
Method | Defined By | ||
---|---|---|---|
Point2D(init:Boolean = true)
This is an abstract class that cannot be instantiated directly. | Point2D | ||
clone():Object | Point2D | ||
Returns the distance from this Point2D to a specified point. | Point2D | ||
distance2(px:Number, py:Number):Number
Returns the distance from this Point2D to a specified point. | Point2D | ||
distanceBetween(x1:Number, y1:Number, x2:Number, y2:Number):Number [static]
Returns the distance between two points. | Point2D | ||
distanceBetweenSq(x1:Number, y1:Number, x2:Number, y2:Number):Number [static]
Returns the square of the distance between two points. | Point2D | ||
distanceSq(p:Point2D):Number
Returns the square of the distance from this Point2D to a specified point. | Point2D | ||
distanceSq2(px:Number, py:Number):Number
Returns the square of the distance from this Point2D to a specified point. | Point2D | ||
equals(obj:Object):Boolean [override]
Determines whether or not two points are equal. | Point2D | ||
getClass():Class [override] | Point2D | ||
hashCode():int [override] | Point2D | ||
setLocation(x:Number, y:Number):void
Sets the location of this Point2D to the specified double coordinates. | Point2D |
Method | Defined By | ||
---|---|---|---|
cloneImpl(o:Object):void | Point2D | ||
initPoint2D():void | Point2D |
location | property |
location:Point2D
[write-only] Sets the location of this Point2D to the same coordinates as the specified Point2D object.
public function set location(value:Point2D):void
x | property |
x:Number
[read-only] Returns the X coordinate of this Point2D in double precision.
public function get x():Number
y | property |
y:Number
[read-only] Returns the Y coordinate of this Point2D in double precision.
public function get y():Number
Point2D | () | Constructor |
public function Point2D(init:Boolean = true)
This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.
Parametersinit:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
clone | () | method |
public function clone():Object
ReturnsObject |
cloneImpl | () | method |
protected function cloneImpl(o:Object):void
Parameters
o:Object |
distance | () | method |
public function distance(p:Point2D):Number
Returns the distance from this Point2D to a specified point.
Parameters
p:Point2D — the specified Point2D
|
Number — the distance between this Point2D to a specified Point2D.
|
distance2 | () | method |
public function distance2(px:Number, py:Number):Number
Returns the distance from this Point2D to a specified point.
Parameters
px:Number — the x coordinate of the other point.
| |
py:Number — the y coordinate of the other point.
|
Number — the distance between this Point2D and the specified point.
|
distanceBetween | () | method |
public static function distanceBetween(x1:Number, y1:Number, x2:Number, y2:Number):Number
Returns the distance between two points.
Parameters
x1:Number — the x coordinate of the first point.
| |
y1:Number — the y coordinate of the first point.
| |
x2:Number — the x coordinate of the second point.
| |
y2:Number — the y coordinate of the second point.
|
Number — the distance between the two sets of specified coordinates.
|
distanceBetweenSq | () | method |
public static function distanceBetweenSq(x1:Number, y1:Number, x2:Number, y2:Number):Number
Returns the square of the distance between two points.
Parameters
x1:Number — the x coordinate of the first point.
| |
y1:Number — the y coordinate of the first point.
| |
x2:Number — the x coordinate of the second point.
| |
y2:Number — the y coordinate of the second point.
|
Number — the square of the distance between the two sets of specified coordinates.
|
distanceSq | () | method |
public function distanceSq(p:Point2D):Number
Returns the square of the distance from this Point2D to a specified point.
Parameters
p:Point2D — the specified Point2D
|
Number — the square of the distance between this Point2D to a specified Point2D.
|
distanceSq2 | () | method |
public function distanceSq2(px:Number, py:Number):Number
Returns the square of the distance from this Point2D to a specified point.
Parameters
px:Number — the x coordinate of the other point.
| |
py:Number — the y coordinate of the other point.
|
Number — the square of the distance between this Point2D and the specified point.
|
equals | () | method |
override public function equals(obj:Object):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.
Parameters
obj:Object — an object to be compared with this Point2D.
|
Boolean — true if the object to be compared is an instance of Point2D and has the same values; false otherwise.
|
getClass | () | method |
override public function getClass():Class
ReturnsClass |
hashCode | () | method |
override public function hashCode():int
Returnsint |
initPoint2D | () | method |
protected final function initPoint2D():void
setLocation | () | method |
public function setLocation(x:Number, y:Number):void
Sets the location of this Point2D to the specified double coordinates.
Parameters
x:Number — the new x coordinate of this point.
| |
y:Number — the new y coordinate of this point.
|