| Method | Defined by | ||
|---|---|---|---|
|
Vector(vx:Number, vy:Number)
Constructor for this class
| Vector | ||
|
angleVector(V:Vector):Number
Returns angle between this instance and given parameter
| Vector | ||
|
dotProduct(V:Vector):Number
Calculates the dot product of this and given vectors
| Vector | ||
|
Defines perpendicular direction vector of this instance.
| Vector | ||
|
norm():Number
Calculates normal of this instance vector
| Vector | ||
|
normalize():void
Normalizes this instance.
| Vector | ||
|
toString():String
Generates a string from this vector.
| Vector | ||
|
Returns the unit vector of this instance.
| Vector | ||
| x | property |
public var x:NumberX component
| y | property |
public var y:NumberY component
| Vector | () | constructor |
public function Vector(vx:Number, vy:Number)Constructor for this class
Parametersvx:Number |
|
vy:Number |
| angleVector | () | method |
public function angleVector(V:Vector):NumberReturns angle between this instance and given parameter
ParametersV:Vector — vector
|
Number — the angle between this instance and the parameter
|
| dotProduct | () | method |
public function dotProduct(V:Vector):NumberCalculates the dot product of this and given vectors
ParametersV:Vector — second vector vector.
|
Number — returns the dot product of this instance and 'V'.
|
| getPerpendicular | () | method |
public function getPerpendicular():VectorDefines perpendicular direction vector of this instance.
ReturnsVector —
A perpendicular direction vector of this instance.
|
| norm | () | method |
public function norm():NumberCalculates normal of this instance vector
ReturnsNumber — returns normal of this instance.
|
| normalize | () | method |
public function normalize():voidNormalizes this instance.
| toString | () | method |
public function toString():StringGenerates a string from this vector. Useful to debug
ReturnsString — A string containing 2d class properties.
|
| unitVector | () | method |
public function unitVector():VectorReturns the unit vector of this instance.
ReturnsVector —
A new Vector object populated with this instance's unit vector.
|