Module ludomath::consts [] [src]

Various relevant mathematical constants.

The constants here in the module would be on their respective types, but that isn't supported yet in stable Rust.

Constants

POINT_ORIGIN

The origin of the coordinate system, (0, 0).

ROTATION_0_DEG

A rotation of zero degrees.

ROTATION_135_DEG

A rotation of 135 degrees.

ROTATION_180_DEG

A rotation of 180 degrees.

ROTATION_225_DEG

A rotation of 225 degrees.

ROTATION_270_DEG

A rotation of 270 degrees.

ROTATION_315_DEG

A rotation of 315 degrees.

ROTATION_45_DEG

A rotation of 45 degrees.

ROTATION_90_DEG

A rotation of 90 degrees.

TAU

The circle constant, τ. Historically known as 2π.

TRANSFORM_IDENTITY

A transformation which has no effect, representing the global coordinate system.

VEC_DOWN

A unit vector pointing downwards, (0, -1).

VEC_DOWN_LEFT

A unit vector pointing down and left, at a 45 degree angle.

VEC_DOWN_RIGHT

A unit vector pointing down and right, at a 45 degree angle.

VEC_LEFT

A unit vector pointing left, (-1, 0).

VEC_ONE

The vector (1, 1).

VEC_RIGHT

A unit vector pointing right, (1, 0).

VEC_UP

A unit vector pointing upwards, (0, 1).

VEC_UP_LEFT

A unit vector pointing up and left, at a 45 degree angle.

VEC_UP_RIGHT

A unit vector pointing up and right, at a 45 degree angle.

VEC_ZERO

The zero vector, (0, 0).