Vec2D class

Properties

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

Methods

apply(Mat2D m) → Vec2D
at(int index) → double
atan2() → double
length() → double
norm() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAt(int index, double value) → void
squaredLength() → double
toOffset() → Offset
toString() → String
A string representation of this object.
override

Operators

operator *(double v) → Vec2D
operator +(Vec2D v) → Vec2D
operator -(Vec2D v) → Vec2D
operator ==(Object o) → bool
The equality operator.
override

Static Methods

approximatelyEqual(Vec2D a, Vec2D b, {double threshold = 0.001}) → bool
copy(Vec2D o, Vec2D a) → void
copyFromList(Vec2D o, Float32List a) → void
distance(Vec2D a, Vec2D b) → double
dot(Vec2D a, Vec2D b) → double
lerp(Vec2D o, Vec2D a, Vec2D b, double f) → Vec2D
negate(Vec2D result, Vec2D a) → Vec2D
normalize(Vec2D result, Vec2D a) → void
onSegment(Vec2D segmentPoint1, Vec2D segmentPoint2, Vec2D pt) → double
scale(Vec2D o, Vec2D a, double scale) → Vec2D
scaleAndAdd(Vec2D result, Vec2D a, Vec2D b, double scale) → Vec2D
segmentSquaredDistance(Vec2D segmentPoint1, Vec2D segmentPoint2, Vec2D pt) → double
squaredDistance(Vec2D a, Vec2D b) → double
transformMat2(Vec2D o, Vec2D a, Mat2D m) → Vec2D
transformMat2D(Vec2D o, Vec2D a, Mat2D m) → Vec2D