A mathematical foundation for nannou including point and vector types and a range of helper/utility functions.
This module contains the most common traits used in
A two-dimensional rotation matrix.
A three-dimensional rotation matrix.
A generic transformation consisting of a rotation, displacement vector and scale amount.
An angle, in degrees.
A set of Euler angles representing a rotation in three-dimensional space.
A 2 x 2, column major matrix
A 3 x 3, column major matrix
A 4 x 4, column major matrix
An orthographic projection with arbitrary left/right/bottom/top distances
A perspective projection with arbitrary left/right/bottom/top distances
A perspective projection based on a vertical field-of-view angle.
A quaternion in scalar/vector form.
An angle, in radians.
Angles and their associated trigonometric functions.
An array containing elements of type
Base floating point types
Base numeric types with partial ordering
Numbers which have upper and lower bounds
Element-wise arithmetic operations. These are supplied for pragmatic reasons, but will usually fall outside of traditional algebraic properties.
Points in a Euclidean space with an associated space of displacement vectors.
Generic trait for floating point numbers
A column-major matrix of arbitrary dimensions.
A type with a distance function between values.
An interface for casting between machine scalars.
Defines a multiplicative identity element for
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.
A two-dimensional rotation.
A three-dimensional rotation.
A column-major major matrix where the rows and column vectors are of the same dimensions.
A trait representing an affine transformation that can be applied to points or vectors. An affine transformation is one which
Defines an additive identity element for
Clamp a value between some range.
Convert the given angle in degrees to the same angle in radians.
Models the C++ fmod function.
Maps a value from an input range to an output range.
The max between two partially ordered values.
The min between two partially ordered values.
Convert the given angle in radians to the same angle in degrees.
Convert the given value in radians to the equivalent value as a number of turns.
Convert the given value as a number of “turns” into the equivalent angle in radians.