Vector class

Constructors

Vector([num x = 0, num y = 0])

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type ↔ String
getter/setter pair
x ↔ num
getter/setter pair
y ↔ num
getter/setter pair

Methods

add(Vector a, {Vector? b}) → Vector
addScalar(num s) → Vector
angle() → double
applyMatrix3(Matrix3 m) → Vector
ceil() → Vector
clampLength(double min, double max) → Vector
clampScalar(double minVal, double maxVal) → Vector
clone() → Vector
copy(Vector v) → Vector
divideScalar(double scalar) → Vector
equals(Vector v) → bool
floor() → Vector
fromArray(List<double> array, [int offset = 0]) → Vector
fromBufferAttribute(BufferAttribute<NativeArray<num>> attribute, int index) → Vector
getComponent(int index) → num
length() → double
lengthSq() → num
manhattanLength() → num
multiplyScalar(num scalar) → Vector
negate() → Vector
normalize() → Vector
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
random() → Vector
round() → Vector
roundToZero() → Vector
set(num x, num y) → Vector
setLength(double length) → Vector
setScalar(double scalar) → Vector
sub(Vector v, {Vector? w}) → Vector
subScalar(num s) → Vector
toArray([List<double>? array, int offset = 0]) → List<num>
toJSON() → List<num>
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited