Expand description
Math backend implementations.
This module provides backend-agnostic math type implementations. The active backend is selected via feature flags.
Functions§
- mat3
- Get element at
(row, col)from aMat3. - mat4
- Get element at
(row, col)from aDMat4. - mat3_
as_ slice - Get
Mat3data as a&[f32]slice (column-major order). - mat3_
from_ column_ slice - Create a
Mat3from a column-major slice. - mat3_
from_ diagonal_ element - Create a diagonal
Mat3withvon the diagonal. - mat3_
from_ row_ slice - Create a
Mat3from a row-major slice. - mat3_
identity - Return the identity
Mat3. - mat3_
iter - Iterate over
Mat3elements (column-major order). - mat3_
row - Extract a row from a
Mat3as[f32; 3]. - mat3_
sub - Subtract two
Mat3matrices element-wise. - mat3_
zeros - Return a zero
Mat3. - mat4_
as_ slice - Return
DMat4data as a&[f64]slice. - mat4_
from_ row_ slice - Create a
DMat4from a row-major slice. - mat4_
identity - Return the identity
DMat4. - mat4_
iter - Iterate over
DMat4elements (column-major order). - mat4_
sub - Subtract two
DMat4matrices element-wise. - mat4_
zeros - Return a zero
DMat4. - point3_
as_ ref - Get point coordinates as a
&[f32; 3]ref. - point3_
as_ slice - Get point coordinates as a slice.
- point3_
origin - Return the origin point (zero vector).
- vec2_
as_ ref - Get
Vec2data as a&[f32; 2]ref. - vec2_
as_ slice - Get
Vec2data as a&[f32]slice. - vec2_
zeros - Create a zero
Vec2. - vec3_
as_ ref - Get
Vec3data as a&[f32; 3]ref. - vec3_
as_ slice - Get
Vec3data as a&[f32]slice. - vec3_
normalized - Return a normalized copy of a
Vec3. - vec3_
zeros - Create a zero
Vec3.