nalgebra is a low-dimensional linear algebra library written for Rust targeting:
All the functionality of nalgebra is grouped in one place: the root module nalgebra::
. This
module re-exports everything and includes free functions for all traits methods performing
out-of-place operations.
Thus, you can import the whole prelude using:
.ignore
use nalgebra::*;
However, the recommended way to use nalgebra is to import types and traits
explicitly, and call free-functions using the na::
prefix:
```.rust extern crate nalgebra as na; use na::{Vector3, Rotation3, Rotation};
fn main() { let a = Vector3::new(1.0f64, 1.0, 1.0); let mut b = Rotation3::new(na::zero());
b.append_rotation_mut(&a);
assert!(na::approx_eq(&na::rotation(&b), &a));
} ```
nalgebra is meant to be a general-purpose, low-dimensional, linear algebra library, with an optimized set of tools for computer graphics and physics. Those features include:
Vector1
, Vector2
, Vector3
, Vector4
, Vector5
, Vector6
.VectorN
(available only with the generic_sizes
feature).Point1
, Point2
, Point3
, Point4
, Point5
, Point6
.Matrix1
, Matrix2
, Matrix3
, Matrix4
, Matrix5
, Matrix6
.Rotation2
, Rotation3
Quaternion
, Unit<Quaternion>
.Unit<T>
, e.g., Unit<Vector3<f32>>
.Isometry2
, Isometry3
Similarity2
, Similarity3
.Persp3
, PerspMatrix3
, Ortho3
, OrthoMatrix3
.DVector
.DVector1
to DVector6
.DMatrix
.Covariance
, Mean
, qr
, cholesky
.