Velocity class

A velocity in two dimensions.

Annotations

Constructors

Velocity({required Offset pixelsPerSecond})
Creates a Velocity.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
pixelsPerSecond Offset
The number of pixels per second of velocity in the x and y directions.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clampMagnitude(double minValue, double maxValue) Velocity
Return a velocity whose magnitude has been clamped to minValue and maxValue.
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 +(Velocity other) Velocity
Return the sum of two velocities.
operator -(Velocity other) Velocity
Return the difference of two velocities.
operator ==(Object other) bool
The equality operator.
override
operator unary-() Velocity
Return the negation of a velocity.

Constants

zero → const Velocity
A velocity that isn't moving at all.