Vector class

Constructors

Vector(num x, num y)
Vector.polar(num len, num angle)
Vector.zero()
const

Properties

degrees num
read-only
hashCode int
The hash code for this object. [...]
read-only, override
isNormalized bool
read-only
isValid bool
read-only
isZero bool
read-only
length num
read-only
lengthSqr num
read-only
rads num
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
x num
final
y num
final

Methods

clone() Vector
crossDet(Vector vec) num
crossDetXY(num x, num y) num
distance(Vector vec) num
distanceSqr(Vector vec) num
distanceXY(num x, num y) num
distanceXYSqr(num x, num y) num
dot(Vector vec) num
dotXY(num x, num y) num
equalsXY(num x, num y) bool
isNear(Vector other) bool
isNearXY(num x, num y) bool
isWithin(Vector other, num epsilon) bool
isWithinXY(num x, num y, num epsilon) bool
lerp(Vector to, num t) Vector
negate() Vector
normalize() Vector
normalLeft() Vector
normalRight() Vector
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reflect(Vector normal) Vector
rotate(num rads) Vector
rotateSpinor(Vector vec) Vector
scale(num scale) Vector
scaleLength(num value) Vector
slerp(Vector vec, num t) Vector
spinorBetween(Vector vec) Vector
toString() String
Returns a string representation of this object.
override

Operators

operator *(Vector other) Vector
operator +(Vector other) Vector
operator -(Vector other) Vector
operator /(Vector other) Vector
operator ==(Object other) bool
The equality operator. [...]
override
operator unary-() Vector

Constants

Epsilon → const num
0.0000001
EpsilonSqr → const num
Epsilon * Epsilon