Rot class
A 2D rotation, stored as the cosine and sine of an angle.
Mirrors the native b2Rot type.
- Annotations
Constructors
- Rot(double cos, double sin)
-
Creates a rotation from a cosine/sine pair.
const
- Rot.fromAngle(double angle)
-
Creates a rotation of
angleradians. - Rot.identity()
-
The identity rotation (an angle of zero).
const
Properties
- angle → double
-
The rotation angle in radians, in the range
[-pi, pi].no setter - cos → double
-
The cosine of the rotation angle.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sin → double
-
The sine of the rotation angle.
final
Methods
-
inverseRotate(
Vector2 v) → Vector2 -
Applies the inverse of this rotation to
v. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rotate(
Vector2 v) → Vector2 -
Rotates
v. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
Rot other) → Rot -
Multiplies this rotation with
other, composing the two rotations. -
operator ==(
Object other) → bool -
The equality operator.
override