Packageorg.aswing.geom
Classpublic class IntPoint

A point with x and y coordinates in int.



Public Properties
 PropertyDefined by
  x : int = 0
IntPoint
  y : int = 0
IntPoint
Public Methods
 MethodDefined by
  
IntPoint(x:int = 0, y:int = 0)
Constructor
IntPoint
  
Duplicates current instance.
IntPoint
  
[static] Create a int point with point.
IntPoint
  
Returns the distance between this point and passing point.
IntPoint
  
Returns the distance square between this point and passing point.
IntPoint
  
equals(o:Object):Boolean
Returns whether or not this passing object is a same value point.
IntPoint
  
move(dx:int, dy:int):IntPoint
Moves this point and return itself.
IntPoint
  
moveRadians(direction:int, distance:int):IntPoint
Moves this point with an direction in radians and distance, then return itself.
IntPoint
  
nextPoint(direction:Number, distance:Number):IntPoint
Returns the point beside this point with direction and distance.
IntPoint
  
Sets the location of this point as same as point p.
IntPoint
  
setLocationXY(x:int = 0, y:int = 0):void
Sets the location of this point with x and y.
IntPoint
  
setWithPoint(p:Point):void
Sets the location with a Point, the value will be transfer to int.
IntPoint
  
toPoint():Point
Return a Point instance with same value.
IntPoint
  
toString():String
IntPoint
Property detail
xproperty
public var x:int = 0
yproperty 
public var y:int = 0
Constructor detail
IntPoint()constructor
public function IntPoint(x:int = 0, y:int = 0)

Constructor

Parameters
x:int (default = 0)
 
y:int (default = 0)
Method detail
clone()method
public function clone():IntPoint

Duplicates current instance.

Returns
IntPoint — copy of the current instance.
creatWithPoint()method 
public static function creatWithPoint(p:Point):IntPoint

Create a int point with point.

Parameters
p:Point

Returns
IntPoint
distance()method 
public function distance(p:IntPoint):int

Returns the distance between this point and passing point.

Parameters
p:IntPoint — the another point.

Returns
int — the distance from this to p.
distanceSq()method 
public function distanceSq(p:IntPoint):int

Returns the distance square between this point and passing point.

Parameters
p:IntPoint — the another point.

Returns
int — the distance square from this to p.
equals()method 
public function equals(o:Object):Boolean

Returns whether or not this passing object is a same value point.

Parameters
o:Object — the object to be compared.

Returns
Boolean — equals or not.
move()method 
public function move(dx:int, dy:int):IntPoint

Moves this point and return itself.

Parameters
dx:int — delta of x.
 
dy:int — delta of y.

Returns
IntPoint — the point itself.
moveRadians()method 
public function moveRadians(direction:int, distance:int):IntPoint

Moves this point with an direction in radians and distance, then return itself.

Parameters
direction:int — the angle in radians.
 
distance:int — the distance in pixels.

Returns
IntPoint — the point itself.
nextPoint()method 
public function nextPoint(direction:Number, distance:Number):IntPoint

Returns the point beside this point with direction and distance.

Parameters
direction:Number
 
distance:Number

Returns
IntPoint — the point beside.
setLocation()method 
public function setLocation(p:IntPoint):void

Sets the location of this point as same as point p.

Parameters
p:IntPoint — the location to be set.
setLocationXY()method 
public function setLocationXY(x:int = 0, y:int = 0):void

Sets the location of this point with x and y.

Parameters
x:int (default = 0) — the x coordinates.
 
y:int (default = 0) — the y coordinates.
setWithPoint()method 
public function setWithPoint(p:Point):void

Sets the location with a Point, the value will be transfer to int.

Parameters
p:Point — the location to be set.
toPoint()method 
public function toPoint():Point

Return a Point instance with same value.

Returns
Point
toString()method 
public function toString():String

Returns
String