NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3029 most downloaded on crates.io
A linear algebra and mathematics library for computer graphics.
Last release 6 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 2.0 years
Some releases are documented
notes for 17 of 34 stable releases
2 versions withdrawn
withdrawn after publishing
12 years old
36 releases · first in 2015
Release 0.18
Release 0.18 (#520)
438: Angle: add the normalize_zero method r=kvark a=mathstuf
438: Angle: add the normalize_zero method r=kvark a=mathstuf
This method is like normalize except that it normalizes to have an
absolute value of no more than turn_div_2.
This is useful for making sure that an angle is no more than some offset from a target angle (e.g., implementing maximum turn rates in games).
Co-authored-by: Ben Boeckel mathstuf@gmail.com
Angle normalizationlerp() from InnerSpace to VectorSpaceconst constructorsOne column per quarter.
Implement ElementWise trait for point types
ElementWise trait for point typesmap function to points and vectorsBaseNum trait requirement for PointN::new functionsRe-export Bounded and implement for vectors, points, and angles
InnerSpace::project_onArray::lenBounded and implement for vectors, points, and anglesEuclideanSpace"swizzle" featureMatrix4::look_at_dirOption from cast functionsImplement mint conversions behind a feature
mint conversions behind a featureQuaternion::castuse_simd feature to simdeders feature to serdeAdd a workaround for rust-lang/rust#41478, and in the process cleaned up some type projections for angles
Nothing published for this version
Update serde and serde_derive to version 1.0.
serde and serde_derive to version 1.0.Add optional use_simd feature to improve the performance of Vector4 , Matrix4 and Quaternion . According to @DaseinPhaos in #394, under the given benc
use_simd feature to improve the performance of Vector4<f32>,
Matrix4<f32> and Quaternion<f32>. According to @DaseinPhaos in #394, under
the given benchmark certain operations were able to become up to 60% faster.serde to version 0.9, and use serde_derive instead of serde_macros.Use approx for approximate equality comparisons
#[repr(packed)] from all structs where it was specifiedChange the angle types to be tuple structs
Quaternion::from_arcInto<Rad<S>> valuesDecomposed::concat implementationA MetricSpace trait for types that have a distance between elements.
MetricSpace trait for types that have a distance between elements.EuclideanSpace::{midpoint, centroid} functions with default
implementations.Vector1 and Point1 structs.eders feature flag.ApproxEq implementation for Decomposed.num-traits crate rather than num, seeing as we only use the
traits in num. num_traits has also been re-exported so that you can more
easily use these in your project.Euler type for euler angle conversions.InnerSpace by MetricSpace.Rotation by OneTransform and Transform3 for Matrix4.Transform, Transform2, and Transform3 for Matrix4.Euler-Quaternion and Quaternion-Euler conversions. The axes are
now correct, and the angles are applied in x-y-z order. The conversion now
matches the conversion from axis angle.Euler-{Matrix3, Matrix4} conversions.Fix angle assignment operators so that they actually mutate self.
self.Assignment operators implementations have been stabilised, to coincide with their stabilisation in Rust 1.8.
Vector trait to VectorSpace.EuclideanVector to InnerSpace.Point to EuclideanSpace, and Point::Vector to EuclideanSpace::Diff.Quaternions now implement VectorSpace and InnerSpace for the functions
they share.Matrix trait is now constraint by VectorSpace, with Matrix::Element
removed in favor of VectorSpace::Scalar.Implements fmt::Debug for Basis2, Basis3, and AffineMatrix3
fmt::Debug for Basis2, Basis3, and AffineMatrix3prelude module for easy importing of common traits.ElementWise trait for non-mathematical element-wise operations.EuclideanVector::angle.fmt::Debug impls for Vector, Matrix, Point, Decomposed,
Quaternion and Angle to make them easier to derive, and have clearer
formatting.#[repr(C, packed)].Vector::{length, length2} functions to Vector::{magnitude, magnitude2}.Angle::new to be directly implemented on the Rad and Deg types.Vector::dot to EuclideanVector trait.Vector::from_value to Array trait.Vector trait, in favor of the ElementWise trait.Angle::equiv.neg_self method on vectors and matrices.Add missing by-ref and by-val permutations of Vector, Matrix, Point, Quaternion and Angle operators.
Vector, Matrix, Point,
Quaternion and Angle operators.'static from some scalar type
parameters.perspective function to take an Into<Rad<S>>.Angle::new for constructing angles from a unitless scalar."unstable"
feature.Vector, Matrix, Point, and Angle are now constrained to require
specific operators to be overloaded. This means that generic code can now use
operators, instead of the operator methods.Rad for ProjectionFov::fovy, rather than arbitrary Angles. This
simplifies the signature of PerspectiveFov from PerspectiveFov<S, A> to
PerspectiveFov<S>.Angle: Debug,
ScalarConv, Into<Rad<S>>, Into<Deg<S>>.Angle no longer requires One, and the implementations have been removed
from Deg and Rad. This is because angles do not close over multiplication,
and therefore cannot have a multiplicative identity. If we were truly accurate,
Angle * Angle would return an Angle^2 (not supported by the current api).Angles make sense from the perspective of
dimensional analysis.Angle.Point::{min, max} methods - these are now covered by the
Array::{min, max} methods that were introduced in 0.5.0.ToComponents, ToComponents2, and ToComponents3. If you were
relying on ToComponents::decompose, you can produce the same effect by
accessing the fields on Decomposed directly. To create the scale vector,
use: Vector::from_value(transform.scale).CompositeTransform, CompositeTransform2, and CompositeTransform3.Vector::one. Vectors don't really have a multiplicative identity.
If you really want a one vector, you can do something like:
Vector::from_value(1.0).Vector, Matrix, Point, and Angle traits
in favor of operator overloading.*_self methods from Vector, Matrix, Point, and Angle. The
operator methods can be used via the unstable assignment operators.#[derive(Hash)] from Deg and Rad. This could never really be used
these types, because they expect to be given a BaseFloat under normal
circumstances.This CHANGELOG for keeping track of notable changes.
Matrix4::{from_scale, from_nonuniform_scale} for easily constructing
homogeneous scale matrices.SquareMatrix::one to SquareMatrix::identity. identity is easier
to search for,
and the more common name for the multiplicative identity for matrices.S: BaseFloat.Take many point and vector parameters by value.
Matrix trait into Matrix and SquareMatrix, opening the door for
non-square matrices in the future.Vector and Point onto the Array1 trait,
and rename it to Array.Array match the naming scheme of those in the
standard library.Ray, Plane, Frustum, Aabb2, Aabb3 Obb2,
Obb3 Sphere, Cylinder. These can now be found at
csherratt/collision-rs.Array2 trait, moving methods onto the Matrix trait.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →