Vector2d |
abs
Returns Vector2d
Reference to this object for method chaining
add
Returns Vector2d
Reference to this object for method chaining
angle
Returns number
angle in radians
ceil
ceilSelf
Returns Vector2d
Reference to this object for method chaining
clamp
clamp(low: number, high: number): Vector2d
clampSelf
clampSelf(low: number, high: number): Vector2d
clone
copy
Returns Vector2d
Reference to this object for method chaining
cross
Returns number
The cross product.
distance
Returns number
The Euclidean distance between this vector and the given vector.
div
Returns Vector2d
Reference to this object for method chaining
dot
Returns number
The dot product.
equals
Returns boolean
True if the coordinates are equal, false otherwise.
floor
floorSelf
Returns Vector2d
Reference to this object for method chaining
length
Returns number
the length of this vector
length2
Returns number
The length^2 of this vector.
lerp
Returns Vector2d
Reference to this object for method chaining
maxV
Returns Vector2d
Reference to this object for method chaining
minV
Returns Vector2d
Reference to this object for method chaining
moveTowards
Returns Vector2d
Reference to this object for method chaining
negate
negateSelf
Returns Vector2d
Reference to this object for method chaining
normalize
Returns Vector2d
Reference to this object for method chaining
perp
Returns Vector2d
Reference to this object for method chaining
project
Returns Vector2d
Reference to this object for method chaining
projectN
Returns Vector2d
Reference to this object for method chaining
rotate
scale
Parameters
- x: number
Optionaly: number = x
Returns Vector2d
Reference to this object for method chaining
scaleV
Returns Vector2d
Reference to this object for method chaining
set
setV
Returns Vector2d
Reference to this object for method chaining
setZero
Returns Vector2d
Reference to this object for method chaining
sub
Returns Vector2d
Reference to this object for method chaining
to2d
Returns Vector2d
Reference to this object for method chaining
toIso
Returns Vector2d
Reference to this object for method chaining
toString
Returns `x:${number},y:${number}`
stringified representation of this vector