Module math

Source
Expand description

Linear algebra types for vector calculations. Basically re-export the cgmath library.

Structs§

Deg
An angle, in degrees.
Matrix3
A 3 x 3, column major matrix
Matrix4
A 4 x 4, column major matrix
Rad
An angle, in radians.
Vector3
A 3-dimensional vector.
Vector4
A 4-dimensional vector.

Traits§

Angle
Angles and their associated trigonometric functions.
Array
An array containing elements of type Element
Bounded
Numbers which have upper and lower bounds
ElementWise
Element-wise arithmetic operations. These are supplied for pragmatic reasons, but will usually fall outside of traditional algebraic properties.
EuclideanSpace
Points in a Euclidean space with an associated space of displacement vectors.
InnerSpace
Vectors that also have a dot (or inner) product.
Matrix
A column-major matrix of arbitrary dimensions.
MetricSpace
A type with a distance function between values.
One
Defines a multiplicative identity element for Self.
Rotation
A trait for a generic rotation. A rotation is a transformation that creates a circular motion, and preserves at least one point in the space.
Rotation2
A two-dimensional rotation.
Rotation3
A three-dimensional rotation.
SquareMatrix
A column-major major matrix where the rows and column vectors are of the same dimensions.
Transform
A trait representing an affine transformation that can be applied to points or vectors. An affine transformation is one which
Transform2
Transform3
VectorSpace
Vectors that can be added together and multiplied by scalars.
Zero
Defines an additive identity element for Self.

Functions§

degrees
Constructs a Degrees
radians
Constructs a Radians
vec3
Constructs a Vec3
vec4
Constructs a Vec4

Type Aliases§

Degrees
Degrees
Mat3
3x3 matrix.
Mat4
4x4 matrix.
Radians
Radians
Vec3
Vector with three elements.
Vec4
Vector with four elements.