Expand description
Math types and helpers.
Consists of re-exported glam types with some additions.
Modules§
- bool
boolvector mask types.- f32
f32vector, quaternion and matrix types.- f64
f64vector, quaternion and matrix types.- i32
i32vector types.- swizzles
- Traits adding swizzle methods to all vector types.
- u32
u32vector types.
Macros§
- const_
dmat2 - Creates a
DMat2from two column vectors that can be used to initialize a constant value. - const_
dmat3 - Creates a
DMat3from three column vectors that can be used to initialize a constant value. - const_
dmat4 - Creates a
DMat4from four column vectors that can be used to initialize a constant value. - const_
dquat - Creates a
DQuatfromx,y,zandwvalues that can be used to initialize a constant value. - const_
dvec2 - Creates a
DVec2that can be used to initialize a constant value. - const_
dvec3 - Creates a
DVec3that can be used to initialize a constant value. - const_
dvec4 - Creates a
DVec4that can be used to initialize a constant value. - const_
ivec2 - Creates a
IVec2that can be used to initialize a constant value. - const_
ivec3 - Creates a
IVec3that can be used to initialize a constant value. - const_
ivec4 - Creates a
IVec4that can be used to initialize a constant value. - const_
m128 - const_
mat2 - Creates a
Mat2from two column vectors that can be used to initialize a constant value. - const_
mat3 - Creates a
Mat3from three column vectors that can be used to initialize a constant value. - const_
mat4 - Creates a
Mat4from four column vectors that can be used to initialize a constant value. - const_
mat3a - Creates a
Mat3Afrom three column vectors that can be used to initialize a constant value. - const_
quat - Creates a
Quatfromx,y,zandwvalues that can be used to initialize a constant value. - const_
uvec2 - Creates a
UVec2that can be used to initialize a constant value. - const_
uvec3 - Creates a
UVec3that can be used to initialize a constant value. - const_
uvec4 - Creates a
UVec4that can be used to initialize a constant value. - const_
vec2 - Creates a
Vec2that can be used to initialize a constant value. - const_
vec3 - Creates a
Vec3that can be used to initialize a constant value. - const_
vec4 - Creates a
Vec4that can be used to initialize a constant value. - const_
vec3a - Creates a
Vec3Athat can be used to initialize a constant value.
Structs§
- Affine2
- A 2D affine transform, which can represent translation, rotation, scaling and shear.
- Affine3A
- A 3D affine transform, which can represent translation, rotation, scaling and shear.
- BVec2
- A 2-dimensional boolean vector.
- BVec3
- A 3-dimensional boolean vector.
- BVec4
- A 4-dimensional boolean vector.
- Circle
- DAffine2
- A 2D affine transform, which can represent translation, rotation, scaling and shear.
- DAffine3
- A 3D affine transform, which can represent translation, rotation, scaling and shear.
- DMat2
- A 2x2 column major matrix.
- DMat3
- A 3x3 column major matrix.
- DMat4
- A 4x4 column major matrix.
- DQuat
- A quaternion representing an orientation.
- DVec2
- A 2-dimensional vector.
- DVec3
- A 3-dimensional vector.
- DVec4
- A 4-dimensional vector.
- IVec2
- A 2-dimensional vector.
- IVec3
- A 3-dimensional vector.
- IVec4
- A 4-dimensional vector.
- Mat2
- A 2x2 column major matrix.
- Mat3
- A 3x3 column major matrix.
- Mat4
- A 4x4 column major matrix.
- Mat3A
- A 3x3 column major matrix.
- Quat
- A quaternion representing an orientation.
- Rect
- A 2D rectangle, defined by its top-left corner, width and height.
- Rect
Offset - UVec2
- A 2-dimensional vector.
- UVec3
- A 3-dimensional vector.
- UVec4
- A 4-dimensional vector.
- Vec2
- A 2-dimensional vector.
- Vec3
- A 3-dimensional vector without SIMD support.
- Vec4
- A 4-dimensional vector.
- Vec3A
- A 3-dimensional vector with SIMD support.
- XY
- XYZ
- XYZW
Enums§
- Euler
Rot - Euler rotation sequences.
Traits§
- Vec2
Swizzles - Swizzle methods for 2-dimensional vector types.
- Vec3
Swizzles - Swizzle methods for 3-dimensional vector types.
- Vec4
Swizzles - Swizzle methods for 4-dimensional vector types.
Functions§
- cartesian_
to_ polar - Converts 2d cartesian coordinates to 2d polar coordinates.
- clamp
- Returns value, bounded in range [min, max].
- dmat2
- Creates a 2x2 matrix from two column vectors.
- dmat3
- Creates a 3x3 matrix from three column vectors.
- dmat4
- Creates a 4x4 matrix from four column vectors.
- dquat
- Creates a quaternion from
x,y,zandwvalues. - dvec2
- Creates a 2-dimensional vector.
- dvec3
- Creates a 3-dimensional vector.
- dvec4
- Creates a 4-dimensional vector.
- ivec2
- Creates a 2-dimensional vector.
- ivec3
- Creates a 3-dimensional vector.
- ivec4
- Creates a 4-dimensional vector.
- mat2
- Creates a 2x2 matrix from two column vectors.
- mat3
- Creates a 3x3 matrix from three column vectors.
- mat4
- Creates a 4x4 matrix from four column vectors.
- mat3a
- Creates a 3x3 matrix from three column vectors.
- polar_
to_ cartesian - Converts 2d polar coordinates to 2d cartesian coordinates.
- quat
- Creates a quaternion from
x,y,zandwvalues. - uvec2
- Creates a 2-dimensional vector.
- uvec3
- Creates a 3-dimensional vector.
- uvec4
- Creates a 4-dimensional vector.
- vec2
- Creates a 2-dimensional vector.
- vec3
- Creates a 3-dimensional vector.
- vec4
- Creates a 4-dimensional vector.
- vec3a
- Creates a 3-dimensional vector.