Module math

Source
Expand description

Math utilities.

Structs§

AABB2D
Provides tools for interacting with and creating axis aligned bounding boxes in 2D.
Interpolation
Provides functions for interpolating between two f32s.
OrthographicCamera
Simple camera for orthographic projections.
PerspectiveCamera
Simple camera for perspective projections. +Y is up, right handed system. Depth is inverted.

Constants§

IDENTITY_MATRIX
Simple const identity matrix.
PI
Represents pi.
PI_2
Represents pi / 2.
PI_NEG_2
Represents -pi / 2.
TAO
Represents 2 * pi.

Traits§

Float
Extra functions on floating point values.
UnsignedInteger
Extra functions on unsigned integers.

Functions§

fast_normalize2
Fast Vector2 normalization.
lerp
Linearly interpolates between a and b by t.
ortho_from_bounds
Creates an orthographic matrix from screen bounds with a fixed aspect ratio and with 0,0 in the center.