All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
Added
i64
andu64
vector types;I64Vec2
,I64Vec3
,I64Vec4
,U64Vec2
,U64Vec3
andU64Vec4
. -
Added
length_squared
method on signed and unsigned integer vector types. -
Added
distance_squared
method on signed integer vector types.
- Changed quaternion
to_axis_angle
for improved numerical stability.
- Removed dependency on
serde_derive
for improved compile times when usingserde
.
0.23.0 - 2023-02-22
- When the
scalar-math
feature is enabled the vector mask type forVec3A
was changed fromBVec3
toBVec3A
.
- Added
copysign
method to signed vector types.
0.22.0 - 2022-10-24
-
Added
u32
implementation ofBVec3A
andBVec4
when SIMD is not available. These are used instead of aliasing to thebool
implementations. -
Removed
Add
,Sub
, and scalarMul
implementations from affine types as they didn't make sense on these types. -
Removed deprecated
const_*
macros. These have been replaced byconst fn
methods.
-
Fixed
neg
andsignum
to consistently handle negative zero across multiple platforms. -
Removed
register_attr
feature usage for SPIR-V targets.
-
Added missing
Serialize
,Deserialize
andPartialEq
implementations. -
Added
Sum<Self>
andProduct<Self>
implementations for all vector, matrix and quaternion types. -
Added 4x4 matrix methods
look_to_lh
andlook_to_rh
. These were previously private. -
Added
dot_into_vec
methods to vector which returns the result of the dot product splatted to all vector lanes. -
Added
is_negative_bitmask
to vector types which returns au32
of bits for each negative vector lane. -
Added
splat
method andTRUE
andFALSE
constants to allBVec
types. -
Added
from_mat3a
methods toAffine2
,Mat2
,Mat4
andQuat
types.
-
Disable
serde
default features. -
Made
to_cols_array
,to_cols_array_2d
, andfrom_diagonal
methodsconst fn
.
0.21.3 - 2022-08-02
- Fixed
glam_assert
being too restrictive in matrix transform point and transform vector methods.
- Added experimental
core-simd
feature which enables SIMD support via the unstablecore::simd
module.
- Derive from
PartialEq
andEq
instead of providing a trait implementation for all non SIMD types.
0.21.2 - 2022-06-25
-
Restore missing
$crate::
prefix in deprecatedconst_*
macros. -
Fixed some performance regressions in affine and matrix determinant and inverses due to lack of inlining.
-
Fixed some performance regressions in the SSE2
Vec3A
toVec3
from conversion.
- Implemented
BitXor
andBitXorAssign
traits forbool
vectors.
0.21.1 - 2022-06-22
- Fix compilation when FMA support is enabled.
0.21.0 - 2022-06-22
-
Minimum Supported Version of Rust bumped to 1.58.1 to allow
const
pointer dereferences in constant evaluation. -
The
abs_diff_eq
method onMat2
andDMat2
now takesother
by value instead of reference. This is consistent with the other matrix types. -
The
AsMut
andDeref
trait implementations onQuat
andDQuat
was removed. Quaternion fields are now public. -
The
AsRef
trait implementations were removed fromBVec2
,BVec3
,BVec3A
,BVec4
andBVec4A
.
-
NEG_ONE
constant was added to all signed vector types. -
NEG_X
,NEG_Y
,NEG_Z
andNEG_W
negative axis vectors were added to signed vector types. -
The
rotate
andfrom_angle
methods were added toVec2
andDVec2
.from_angle
returns a 2D vector containing[angle.cos(), angle.sin()]
that can be used torotate
another 2D vector. -
The
from_array
const
function was added to all vector types.
-
Source code is now largely generated. This removes most usage of macros internally to improve readability. There should be no change in API or behavior other than what is documented here.
-
Many methods have been made
const fn
:new
,splat
,from_slice
,to_array
andextend
on vector typesfrom_cols
,from_cols_array
,from_cols_array_2d
,from_cols_slice
on matrix typesfrom_xyzw
andfrom_array
on quaternion typesfrom_cols
on affine types
-
The
const
new macros where deprecated.
- Deleted deprecated
TransformRT
andTransformSRT
types.
0.20.5 - 2022-04-12
- Fixed a bug in the scalar implementation of 4D vector
max_element
method where thew
element check was incorrect.
0.20.4 - 2022-04-11
- Fixed a bug with quaternion
slerp
with a rotation of tau.
0.20.3 - 2022-03-28
- Added
to_array()
toQuat
andDQuat
. - Added
mul_add
method to all vector types - note that this will be slower without hardware support enabled. - Added the
fast-math
flag which will sacrifice some float determinism for speed.
- Fixed a bug in the
sse2
andwasm32
implementations ofMat4::determinant()
.
0.20.2 - 2021-12-20
- Fixed SPIR-V build which was broken due to a typo.
0.20.1 - 2021-11-23
- Added the
from_rotation_arc_2d()
method toQuat
andDQuat
which will return a rotation between two 2D vectors around the z axis. - Added impl of
Neg
operator for matrix types. - Added
cuda
feature which forcesglam
types to match cuda's alignment requirements.
- The
Quat
andDQuat
methodsfrom_rotation_arc()
andfrom_rotation_arc_colinear()
are now available inno_std
. - The
Vec3
andDVec3
methodsany_orthogonal_vector()
,any_orthonormal_vector()
andany_orthonormal_pair()
are now available inno_std
. - Added
repr(C)
attribute to affine types.
- Removed deprecated
as_f32()
,as_f64()
,as_i32()
andas_u32()
methods.
0.20.0 - 2021-11-01
- Minimum Supported Version of Rust bumped to 1.52.1 for an update to the
mint
crate.
- Added implementations for new
IntoMint
trait from themint
crate. - Added
mint
conversions forMat3A
. - Added
as_vec3a
cast methods to vector types.
0.19.0 - 2021-10-05
- Removed truncating vector
From
implementations. Use.truncate()
or swizzle methods instead.
- Added
Not
,Shl
,Shr
,BitAnd
,BitOr
andBitXor
implementations for allIVec
andUVec
vector types. - Added
NAN
constant for all types. - Documented
glam
's architecture.
Sum
andProduct
traits are now implemented inno_std
builds.
0.18.0 - 2021-08-26
- Minimum Supported Version of Rust bumped to 1.51.0 for
wasm-bindgen-test
andrustdoc
alias
support.
- Added
wasm32
SIMD intrinsics support. - Added optional support for the
rkyv
serialization crate. - Added
Rem
andRemAssign
implementations for all vector types. - Added quaternion
xyz()
method for returning the vector part of the quaternion. - Added
From((Scalar, Vector3))
for 4D vector types.
- Deprecated
as_f32()
,as_f64()
,as_i32()
andas_u32()
methods in favor of more specific methods such asas_vec2()
,as_dvec2()
,as_ivec2()
andas_uvec2()
and so on.
0.17.3 - 2021-07-18
- Fix alignment unit tests on non x86 platforms.
0.17.2 - 2021-07-15
- Fix alignment unit tests on i686 and S390x.
0.17.1 - 2021-06-29
- Added
serde
support forAffine2
,DAffine2
,Affine3A
andDAffine3
.
0.17.0 - 2021-06-26
- The addition of
Add
andSub
implementations of scalar values for vector types may create ambiguities with existing calls toadd
andsub
. - Removed
From<Mat3>
implementation forMat2
andFrom<DMat3>
forDMat2
. These have been replaced byMat2::from_mat3()
andDMat2::from_mat3()
. - Removed
From<Mat4>
implementation forMat3
andFrom<DMat4>
forDMat3
. These have been replaced byMat3::from_mat4()
andDMat3::from_mat4()
. - Removed deprecated
from_slice_unaligned()
,write_to_slice_unaligned()
,from_rotation_mat4
andfrom_rotation_ypr()
methods.
- Added
col_mut()
method which returns a mutable reference to a matrix column to all matrix types. - Added
AddAssign
,MulAssign
andSubAssign
implementations for all matrix types. - Added
Add
andSub
implementations of scalar values for vector types. - Added more
glam_assert!
checks and documented methods where they are used. - Added vector projection and rejection methods
project_onto()
,project_onto_normalized()
,reject_from()
andreject_from_normalized()
. - Added
Mat2::from_mat3()
,DMat2::from_mat3()
,Mat3::from_mat4()
,DMat3::from_mat4()
which create a smaller matrix from a larger one, discarding a final row and column of the input matrix. - Added
Mat3::from_mat2()
,DMat3::from_mat2()
,Mat4::from_mat3()
andDMat4::from_mat3()
which create an affine transform from a smaller linear transform matrix.
- Don't support
AsRef
andAsMut
on SPIR-V targets. Also removed SPIR-V support for some methods that usedas_ref()
, includinghash()
. Not a breaking change as these methods would not have worked anyway.
- Fixed compile time alignment checks failing on i686 targets.
0.16.0 - 2021-06-06
sprirv-std
dependency was removed, rust-gpu depends on glam internally again for now.- Added
must_use
attribute to allinverse()
,normalize()
,try_normalize()
,transpose()
andconjugate()
methods.
- Added
fract()
method to float vector types which return a vector containingself - self.floor()
. - Added optional support for the
approx
crate. Note that all glam types implement their ownabs_diff_eq()
method without requiring theapprox
dependency.
0.15.2 - 2021-05-20
- Added
from_cols()
methods to affine types. - Added methods for reading and writing affine types from and to arrays and
slices, including
from_cols_array()
,to_cols_array()
,from_cols_array_2d()
,to_cols_array_2d()
,from_cols_slice()
andwrite_cols_to_slice()
. - Added
core::fmt::Display
trait implementations for affine types. - Added
core::ops::Add
,core::ops::Mul
scalar andcore::ops::Sub
trait implementations for affine types. - Added
from_array()
methods to quaternion types.
- Renamed vector and quaternion
from_slice_unaligned()
andwrite_to_slice_unaligned()
methods tofrom_slice()
andwrite_to_slice()
. - Removed usage of
_mm_rcp_ps
from SSE2 implementation ofQuat::slerp
as this instruction is not deterministic between Intel and AMD chips.
0.15.1 - 2021-05-14
- Disable
const_assert_eq!
size and alignment checks for SPIR-V targets.
0.15.0 - 2021-05-14
- Removed
PartialOrd
andOrd
trait implementations for allglam
types. - Removed deprecated
zero()
,one()
,unit_x()
,unit_y()
,unit_z()
,unit_w()
,identity()
andMat2::scale()
methods. - Remove problematic
Quat
From
trait conversions which would allow creating a non-uniform quaternion without necessarily realising, including fromVec4
,(x, y, z, w)
and[f32; 4]
.
- Added
EulerRot
enum for specifying Euler rotation order andQuat::from_euler()
,Mat3::from_euler()
andMat4::from_euler()
which support specifying a rotation order and angles of rotation. - Added
Quat::to_euler()
method for extracting Euler angles. - Added
Quat::from_vec4()
which is an explicit method for creating a quaternion from a 4D vector. The method does not normalize the resulting quaternion. - Added
Mat3A
type which usesVec3A
columns. It is 16 byte aligned and contains internal padding but it generally faster thanMat3
for most operations if SIMD is available. - Added 3D affine transform types
Affine3A
andDAffine3
. These are more efficient than usingMat4
andDMat4
respectively when working with 3D affine transforms. - Added 2D affine transform types
Affine2
andDAffine2
. These are more efficient than usingMat3
andDMat3
respectively when working with 2D affine transforms. - Added
Quat::from_affine3()
to create a quaternion from an affine transform rotation. - Added explicit
to_array()
method to vector types to better match the matrix methods.
- Deprecated
Quat::from_rotation_ypr()
,Mat3::from_rotation_ypr()
andMat4::from_rotation_ypr()
in favor of newfrom_euler()
methods. - Deprecated
Quat::from_rotation_mat3()
andQuat::from_rotation_mat4()
in favor of newfrom_mat3
andfrom_mat4
methods. - Deprecated
TransformSRT
andTransformRT
which are under thetransform-types
feature. These will be moved to a separate experimental crate. - Updated
spirv-std
dependency version to0.4.0-alpha7
.
0.14.0 - 2021-04-09
- Minimum Supported Version of Rust bumped to 1.45.0 for the
spirv-std
dependency.
- Added
AXES[]
constants to all vector types. These are arrays containing the unit vector for each axis. - Added quaternion
from_scaled_axis
andto_scaled_axis
methods.
- Updated dependency versions of
bytemuck
to1.5
,rand
to0.8
,rand_xoshiro
to0.6
andspirv-std
to0.4.0-alpha4
.
0.13.1 - 2021-03-24
- Added vector
clamp()
functions. - Added matrix column and row accessor methods,
col()
androw()
. - Added SPIR-V module and dependency on
spirv-std
for the SPIR-V target. - Added matrix truncation from 4x4 to 3x3 and 3x3 to 2x2 via
From
impls.
- Documentation corrections and improvements.
0.13.0 - 2021-03-04
- The behavior of the 4x4 matrix method
transform_point3()
was changed to not perform the perspective divide. This is an optimization for use with affine transforms where perspective correction is not required. Theproject_point3()
method was added for transforming points by perspective projections. - The 3x3 matrix
from_scale()
method was changed to create a affine transform containing a 2-dimensional non-uniform scale to be consistent with the 4x4 matrix version. Thefrom_diagonal()
method can be used to create a 3x3 scale matrix. - The 3x3 matrix methods
transform_point2_as_vec3a
,transform_vector2_as_vec3a
andmul_vec3_as_vec3a
were unintentionallypub
and are no longer publicly accessible.
- Added
Vec2::X
,Vec4::W
etc constants as a shorter versions ofunit_x()
and friends. - Added
ONE
constants for vectors. - Added
IDENTITY
constants forMat2
,Mat3
,Mat4
andQuat
. - Added
ZERO
constant for vectors and matrices. - Added
clamp_length()
,clamp_length_max()
, andclamp_length_min
methods forf32
andf64
vector types. - Added
try_normalize()
andnormalize_or_zero()
for all real vector types. - Added
from_diagonal()
methods to all matrix types for creating diagonal matrices from a vector. - Added
angle_between()
,from_rotation_arc()
andfrom_rotation_arc_colinear()
to quaternion types. - Added quaternion
inverse()
which assumes the quaternion is already normalized and returns the conjugate. - Added
from_translation()
andfrom_angle()
methods to 3x3 matrix types. - Added
project_point3()
method to 4x4 matrix types. This method is for transforming 3D vectors by perspective projection transforms. - Added
Eq
andHash
impls for integer vector types.
- Deprecated
::unit_x/y/z()
,::zero()
,::one()
,::identity()
functions in favor of constants.
0.12.0 - 2021-01-15
Vec2Mask
,Vec3Mask
andVec4Mask
have been replaced byBVec2
,BVec3
,BVec3A
,BVec4
andBVec4A
. These types are used by some vector methods and are not typically referenced directly.
- Added
f64
primitive type support- vectors:
DVec2
,DVec3
andDVec4
- square matrices:
DMat2
,DMat3
andDMat4
- a quaternion type:
DQuat
- vectors:
- Added
i32
primitive type support- vectors:
IVec2
,IVec3
andIVec4
- vectors:
- Added
u32
primitive type support- vectors:
UVec2
,UVec3
andUVec4
- vectors:
- Added
bool
primitive type support- vectors:
BVec2
,BVec3
andBVec4
- vectors:
build.rs
has been removed.
0.11.3 - 2020-12-29
- Made
Vec3
repr(simd)
forspirv
targets.
- Added
From<(Vec2, f32)>
forVec3
andFrom<(Vec3, f32)
forVec4
.
0.11.2 - 2020-12-04
- Compilation fixes for Rust 1.36.0.
0.11.1 - 2020-12-03
- Added support for the Rust GPU SPIR-V target architecture.
0.11.0 - 2020-11-26
- Added
is_finite
method to all types which returnstrue
if, and only if, all contained elements are finite. - Added
exp
andpowf
methods for all vector types.
- The
is_nan
method now returns abool
to match the newis_finite
method and to be consistent with the same methods on thef32
andf64
primitive types. - Renamed
is_nan
which returns a vector mask tois_nan_mask
. - Don't use the
cfg
definitions added bybuild.rs
for defining structs asrust-analyzer
is not aware of them.
- Removed deprecated accessor methods.
0.10.2 - 2020-11-17
- Deprecated element accessor members
.x()
,.x_mut()
,.set_x()
, etc. on vector and quaternion types. - Deprecated column accessor members
.x_axis()
,.x_axis_mut()
,.set_x_axis()
, etc. on matrix types.
0.10.1 - 2020-11-15
- Added the
Vec2::perp
method which returns aVec2
perpendicular toself
.
Vec2
andVec3
types were changed to use public named fields for.x
,.y
, and.z
instead of accessors.Quat
,Vec3A
andVec4
implementDeref
andDerefMut
for the newXYZ
andXYZW
structs to emulate public named field access.Mat3
andMat4
had their axis members made public instead of needing accessors.Mat2
implementsDeref
andDerefMut
for the newXYAxes
struct to emulate public named field access.
- Removed deprecated
length_reciprocal
andsign
methods.
- Adding
glam
as ano_std
dependency should now work as expected.
0.10.0 - 2020-10-31
- Changed the return type of
Vec4::truncate
fromVec3A
toVec3
.
- Added
From
implementations to truncate to narrower vector types, e.g.Vec4
toVec3A
,Vec3
andVec2
and fromVec3A
andVec3
toVec2
. - Added swizzles for
Vec4
,Vec3A
,Vec3
andVec2
. These can be used to reorder elements in the same type and also to create larger or smaller vectors from the given vectors elements. - Added
Quat
operatorsAdd<Quat>
,Sub<Quat>
,Mul<f32>
andDiv<f32
. These are used by other crates for interpolation quaternions along splines. Note that these operations will not return unit length quaternions, thus the results must be normalized before performing otherQuat
operations. - Added
Mat4::transform_point3a
andMat4::transform_vector3a
. - Added
AsRef<[f32; 9]>
andAsMut<[f32; 9]>
trait implementations toMat3
. - Added optional
bytemuck
support primarily for casting types to&[u8]
. - Added support for compiling with
no_std
by disabling the defaultstd
feature and adding thelibm
feature. - Added
distance
anddistance_squared
methods toVec2
,Vec3
,Vec3A
andVec4
.
0.9.5 - 2020-10-10
glam
uses SSE2 for some types which prevents constructor functions can not be madeconst fn
. To work around this limitation the following macro functions have been added to support creatingconst
values ofglam
types:const_mat2
,const_mat3
,const_mat4
,const_quat
,const_vec2
,const_vec3
,const_vec3a
andconst_vec4
.- Added
is_nan
methods toVec2
,Vec3
,Vec3A
andVec4
which return a mask.
- Renamed the vector
reciprocal
andlength_reciprocal
methods torecip
andlength_recip
to match the Rust standard library naming. The old methods have been deprecated. - Renamed the vector
sign
methods tosignum
match the Rust standard library naming. The new methods now check forNAN
. The old methods have been deprecated. - Added SSE2 optimized implementations of
Mat4::determinant
andMat4::inverse
.
- Removed deprecated function
Mat4::perspective_glu_rh
.
0.9.4 - 2020-08-31
- Fixed
Mat4::transform_point3
to account for homogeneous w coordinate. Previously this would have been incorrect when the resulting homogeneous coordinate was not 1.0, e.g. when transforming by a perspective projection. - Fixed
Mat3::transform_point2
to account for homogeneous z coordinate.
0.9.3 - 2020-08-11
- Added
Mat4::perspective_rh
.
0.9.2 - 2020-07-09
- Added
Mat3::mul_vec3a
andQuat::mul_vec3a
.
- Changed
Quat::mul_vec3
to accept and returnVec3
instead ofVec3A
.
0.9.1 - 2020-07-01
- Added
Mat3 * Vec3A
implementation. - Added
Vec3A
benches.
- Some documentation improvements around the new
Vec3A
type.
0.9.0 - 2020-06-28
Vec3
has been split into scalarVec3
and 16 byte alignedVec3A
types. Only theVec3A
type currently uses SIMD optimizations.Vec3Mask
has been split into scalarVec3Mask
and 16 byte alignedVec3AMask
types.- Added
mut
column accessors to all matrix types, e.g.Mat2::x_axis_mut()
. - Added
From
trait implementations forVec3AMask
andVec4Mask
to__m128
.
- The
Mat3
type is using the scalarVec3
type for storage. - Simplified
Debug
trait output forQuat
,Vec4
andVec3A
.
- Removed the
packed-vec3
feature flag as it is now redundant.
0.8.7 - 2020-04-28
- Added
Quat::slerp
- note that this uses asin
approximation. - Added
angle_between
method forVec2
andVec3
. - Implemented
Debug
,Display
,PartialEq
,Eq
,PartialOrd
,Ord
,Hash
, andAsRef
traits forVec2Mask
,Vec3Mask
andVec4Mask
. - Added conversion functions from
Vec2Mask
,Vec3Mask
andVec4Mask
to an array of[u32]
. - Added
build.rs
to simplify conditional feature compilation.
- Increased test coverage.
- Removed
cfg-if
dependency.
0.8.6 - 2020-02-18
- Added the
packed-vec3
feature flag to disable using SIMD types forVec3
andMat3
types. This avoids wasting some space due to 16 byte alignment at the cost of some performance. - Added
x_mut
,y_mut
,z_mut
,w_mut
where appropriate toVec2
,Vec3
andVec4
. - Added implementation of
core::ops::Index
andcore::ops::IndexMut
forVec2
,Vec3
andVec4
.
- Merged SSE2 and scalar
Vec3
andVec4
implementations into single files using thecfg-if
crate.
0.8.5 - 2020-01-02
- Added projection functions
Mat4::perspective_lh
,Mat4::perspective_infinite_lh
,Mat4::perspective_infinite_reverse_lh
,Mat4::orthgraphic_lh
andMat4::orthographic_rh
. - Added
round
,ceil
andfloor
methods toVec2
,Vec3
andVec4
.
0.8.4 - 2019-12-17
- Added
Mat4::to_scale_rotation_translation
for extracting scale, rotation and translation from a 4x4 homogeneous transformation matrix. - Added
cargo-deny
GitHub Action.
- Renamed
Quat::new
toQuat::from_xyzw
.
0.8.3 - 2019-11-27
- Added
Mat4::orthographic_rh_gl
.
- Renamed
Mat4::perspective_glu_rh
toMat4::perspective_rh_gl
. - SSE2 optimizations for
Mat2::determinant
,Mat2::inverse
,Mat2::transpose
,Mat3::transpose
,Quat::conjugate
,Quat::lerp
,Quat::mul_vec3
,Quat::mul_quat
andQuat::from_rotation_ypr
. - Disabled optimizations to
Mat4::transform_point3
andMat4::transform_vector3
as they are probably incorrect and need investigating. - Added missing
#[repr(C)]
toMat2
,Mat3
andMat4
. - Benchmarks now store output of functions to better estimate the cost of a function call.
- Removed deprecated functions
Mat2::new
,Mat3::new
andMat4::new
.
0.8.2 - 2019-11-06
glam_assert!
is no longer enabled by default in debug builds, it can be enabled in any configuration using theglam-assert
feature or in debug builds only using thedebug-glam-assert
feature.
glam_assert!
's checkinglerp
is bounded between 0.0 and 1.0 and that matrix scales are non-zero have been removed.
0.8.1 - 2019-11-03
- Added
Display
trait implementations forMat2
,Mat3
andMat4
.
- Disabled
glam
's SSE2sin_cos
implementation - it became less precise for large angle values. - Reduced the default epsilon used by the
is_normalized!
macro fromstd::f32::EPSILON
to1e-6
.
0.8.0 - 2019-10-14
- Removed the
approx
crate dependency. Eachglam
type has anabs_diff_eq
method added which is used by unit tests for approximate floating point comparisons. - Removed the
Angle
type. All angles are nowf32
and are expected to be in radians. - Removed the deprecated
Vec2b
,Vec3b
andVec4b
types and themask
methods onVec2Mask
,Vec3Mask
andVec4Mask
.
- The
rand
crate dependency has been removed from default features. This was required for benchmarking but a simple random number generator has been added to the benchessupport
module instead. - The
From
trait implementation converting between 1D and 2Df32
arrays and matrix types have been removed. It was ambiguous how array data would map to matrix columns so these have been replaced with explicit methodsfrom_cols_array
andfrom_cols_array_2d
. - Matrix
new
methods have been renamed tofrom_cols
to be consistent with the other methods that create matrices from data. - Renamed
Mat4::perspective_glu
toMat4::perspective_glu_rh
.
0.7.2 - 2019-09-22
- Fixed incorrect projection matrix methods
Mat4::look_at_lh
andMat4::look_at_rh
.
- Added support for building infinite projection matrices, including both
standard and reverse depth
Mat4::perspective_infinite_rh
andMat4::perspective_infinite_rh
. - Added
Vec2Mask::new
,Vec3Mask::new
andVec4Mask::new
methods. - Implemented
std::ops
BitAnd
,BitAndAssign
,BitOr
,BitOrAssign
andNot
traits forVec2Mask
,Vec3Mask
andVec4Mask
. - Added method documentation for
Vec4
andVec4Mask
types. - Added missing
serde
implementations forMat2
,Mat3
andMat4
. - Updated
rand
andcriterion
versions.
0.7.1 - 2019-07-08
- The SSE2 implementation of
Vec4
dot
was missing a shuffle, meaning thedot
,length
,length_squared
,length_reciprocal
andnormalize
methods were sometimes incorrect.
- Added the
glam_assert
macro which behaves like Rust'sdebug_assert
but can be enabled separately todebug_assert
. This is used to perform asserts on correctness. - Added
is_normalized
method toVec2
,Vec3
andVec4
.
- Replaced usage of
std::mem::uninitialized
withstd::mem::MaybeUninit
. This change requires stable Rust 1.36. - Renamed
Vec2b
toVec2Mask
,Vec3b
toVec3Mask
andVec4b
toVec4Mask
. Old names are aliased to the new name and deprecated. - Deprecate
VecNMask
mask
method, use newbitmask
method instead - Made fallback version of
VecNMask
types the same size and alignment as the SIMD versions. - Added
Default
support toVecNMask
types, will add more common traits in the future. - Added
#[inline]
tomat2
,mat3
andmat4
functions.
0.7.0 - 2019-06-28
- Added
Mat2
into[f32; 4]
,Mat3
into[f32; 9]
andMat4
into[f32; 16]
.
- Removed
impl Mul<&Vec2> for Mat2
andimpl Mul<&Vec3> for Vec3
as these don't exist for any other types.
0.6.1 - 2019-06-22
Mat2
now uses aVec4
internally which gives it some performance improvements when SSE2 is available.
- Switched from row vectors to column vectors
- Vectors are now on the right of multiplications with matrices and quaternions.