use-matrix
Install
[]
= "0.0.4"
What belongs here
use-matrix owns plain f64 matrix primitives and direct matrix operations.
The current surface includes Matrix2, Matrix3, Matrix4, matrix-matrix
multiplication, matrix-vector multiplication, transpose, trace, determinants,
and inverses for 2x2 and 3x3 matrices.
Scalar division follows normal f64 semantics. Dividing by zero yields
infinities or NaN instead of panicking.
Neighboring crates
| Crate | Responsibility |
|---|---|
use-matrix |
Matrix primitives and direct matrix operations |
use-vector |
Vector primitives and vector operations |
use-linear |
Higher-level linear algebra algorithms and solver-style workflows |
use-geometry |
Geometric transforms, shapes, points, and spatial algorithms |
use-physics |
Physical formulas that use matrices |
use-matrix intentionally does not add geometry-specific transforms,
quaternions, unit-aware matrices, or broader decomposition and solver APIs.
Examples
2x2 determinant
use Matrix2;
let matrix = new;
assert_eq!;
2x2 inverse
use Matrix2;
let matrix = new;
let inverse = matrix.inverse.unwrap;
let identity = matrix * inverse;
assert!;
assert!;
3x3 identity and multiplication
use Matrix3;
let matrix = new;
assert_eq!;
4x4 transpose
use Matrix4;
let matrix = from_rows;
let transposed = matrix.transpose;
assert_eq!;
assert_eq!;
Status
use-matrix is a concrete pre-1.0 crate in the RustUse math workspace. The
API stays small, explicit, and dependency-light so adjacent crates can build on
it without pulling in geometry-specific or solver-specific abstractions.