use-vector
Install
[]
= "0.0.5"
What belongs here
use-vector owns plain f64 vector primitives and reusable vector operations.
The current surface includes Vector2, Vector3, Vector4, dot products,
Vector3::cross, norms, normalization, scaling, distances, and linear interpolation.
Scalar division follows normal f64 semantics. Dividing by zero yields infinities or
NaN instead of panicking.
Neighboring crates
| Crate | Responsibility |
|---|---|
use-vector |
Vector primitives and vector operations |
use-matrix |
Matrix primitives |
use-linear |
Higher-level linear algebra algorithms and matrix-oriented workflows |
use-geometry |
Points, shapes, angles, geometric relationships, and spatial algorithms |
use-physics |
Physical formulas that use vectors |
use-vector intentionally does not add geometry-specific types, matrices, unit-aware
vectors, or domain-specific physics helpers.
Examples
Vector magnitude
use Vector2;
let a = new;
assert_eq!;
Dot and cross products
use ;
let a = new;
let b = new;
assert_eq!;
let x = new;
let y = new;
assert_eq!;
Normalization
use Vector2;
let unit = new
.normalize
.expect;
assert!;
assert!;
Distance
use Vector3;
let start = ZERO;
let end = new;
assert_eq!;
Status
use-vector is a concrete pre-1.0 crate in the RustUse math workspace. The API stays
small, explicit, and dependency-free so adjacent crates can build on a stable vector core.