Vec2 class
Methods
-
add(Vec2 other)
→ void
-
-
clamp(double maxLength)
→ void
-
-
clamped(double maxLength)
→ Vec2
-
-
clone()
→ Vec2
-
-
cross(Vec2 other)
→ double
-
-
damp(Vec2 other, double lambda, double deltaTime)
→ void
-
-
distanceSquaredTo(Vec2 other)
→ double
-
-
distanceTo(Vec2 other)
→ double
-
-
divide(Vec2 other)
→ void
-
-
dot(Vec2 other)
→ double
-
-
draw(Canvas canvas, Color color, {bool drawArrowHead = true, bool drawOrigin = false, Offset origin = Offset.zero, double scale = 1})
→ void
-
-
lerp(Vec2 other, double t)
→ Vec2
-
-
moveTowards(Vec2 other, double maxDelta)
→ void
-
-
mult(Vec2 other)
→ void
-
-
normalize()
→ void
-
-
normalized()
→ Vec2
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
offset({double dx = 0, double dy = 0})
→ Offset
-
-
reflect(Vec2 normal)
→ void
-
-
reflected(Vec2 normal)
→ Vec2
-
-
rotate(double angle)
→ void
-
-
rotated(double angle)
→ Vec2
-
-
scale(double scalar)
→ void
-
-
set(double newX, double newY)
→ void
-
-
setFrom(Vec2 other)
→ void
-
-
setMag(double mag)
→ void
-
-
sub(Vec2 other)
→ void
-
-
toJson()
→ Map<String, double>
-
-
toString()
→ String
-
A string representation of this object.
override