| Package | pegas.geom |
| Class | public class Vector2 |
| Implements | Geometry |
| Subclasses | Point, Vector3 |
| Property | Defined by | ||
|---|---|---|---|
| x : Number
Defined the x coordinate.
| Vector2 | ||
| y : Number
Defined the y coordinate.
| Vector2 | ||
| ZERO : Vector2
[static]
Defines the Vector2 object with the x and y properties set to zero.
| Vector2 | ||
| Method | Defined by | ||
|---|---|---|---|
|
Vector2(x:Number = 0, y:Number = 0)
Creates a new
Vector2 instance. | Vector2 | ||
|
addition(v:*):void
Computes the addition of two vectors.
| Vector2 | ||
|
clone():*
Returns a shallow copy of this instance.
| Vector2 | ||
|
equals(o:*):Boolean
Compares the specified object with this object for equality.
| Vector2 | ||
|
scale(value:Number):void
Scales the vector object with the input value.
| Vector2 | ||
|
substraction(v:*):void
Computes the substraction of the current vector object with an other.
| Vector2 | ||
|
toFlash():Point
Returns a flash.geom.Point reference of this object.
| Vector2 | ||
|
toObject():Object
Returns the Object representation of this object.
| Vector2 | ||
|
toSource(indent:int = 0):String
Returns the source code string representation of the object.
| Vector2 | ||
|
toString():String
Returns the string representation of the object.
| Vector2 | ||
| x | property |
public var x:NumberDefined the x coordinate.
| y | property |
public var y:NumberDefined the y coordinate.
| ZERO | property |
public static var ZERO:Vector2Defines the Vector2 object with the x and y properties set to zero.
| Vector2 | () | constructor |
public function Vector2(x:Number = 0, y:Number = 0)
Creates a new Vector2 instance.
x:Number (default = 0) — the x coordinate.
|
|
y:Number (default = 0) — the y coordinate.
|
| addition | () | method |
public function addition(v:*):voidComputes the addition of two vectors.
Parametersv:* — the vector object to add.
|
| clone | () | method |
public function clone():*Returns a shallow copy of this instance.
Returns* — a shallow copy of this instance.
|
| equals | () | method |
public function equals(o:*):BooleanCompares the specified object with this object for equality.
Parameterso:* |
Boolean — true if the the specified object is equal with this object.
|
| scale | () | method |
public function scale(value:Number):voidScales the vector object with the input value.
Parametersvalue:Number — a real number to scale the current vector object.
|
| substraction | () | method |
public function substraction(v:*):voidComputes the substraction of the current vector object with an other.
Parametersv:* — the vector to substract.
|
| toFlash | () | method |
public function toFlash():PointReturns a flash.geom.Point reference of this object.
ReturnsPoint — a flash.geom.Point reference of this object.
|
| toObject | () | method |
public function toObject():ObjectReturns the Object representation of this object.
ReturnsObject — the Object representation of this object.
|
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source code string representation of the object.
Parametersindent:int (default = 0) |
String — the source code string representation of the object.
|
| toString | () | method |
public function toString():StringReturns the string representation of the object.
ReturnsString — the string representation of the object.
|