Vector2 class

Vector2, 2 components.

Constructors

Vector2(double x, double y)
Vector2, 2 components.
Vector2.all(double value)
Construct Vector2 with all values set to value.
Vector2.fromRef(Vector2 ref)
Construct Vector2 from native reference.
Vector2.zero()
Construct empty Vector2.

Properties

hashCode int
The hash code for this object.
no setterinherited
length double
Calculate vector length.
no setter
lengthSqr double
Calculate vector square length.
no setter
pointer Pointer<Vector2>?
Native pointer, used internally.
final
ref ↔ Vector2
Native reference.
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x double
Vector x component.
getter/setter pair
y double
Vector y component.
getter/setter pair

Methods

angle(Vector2 v) double
Calculate angle from two vectors in X-axis.
distance(Vector2 v) double
Calculate distance between two vectors.
dot(Vector2 v) double
Calculate two vectors dot product.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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