| 1 | # Changelog |
| 2 | |
| 3 | All notable changes to this project will be documented in this file. |
| 4 | |
| 5 | The format is based on [Keep a Changelog], and this project adheres to |
| 6 | [Semantic Versioning]. |
| 7 | |
| 8 | ## [0.30.10] - 2026-01-07 |
| 9 | |
| 10 | ### Added |
| 11 | |
| 12 | * Added float vector `exp2`, `ln` and `log2` methods. |
| 13 | |
| 14 | * Added convenience methods for working with homogeneous coordinates, including |
| 15 | 3D vector `from_homogeneous` and `to_homogeneous` and 4D vector `project`. |
| 16 | |
| 17 | ### Fixed |
| 18 | |
| 19 | * Fixed `rand` `UniformSampler` `new_inclusive` methods so they're actually |
| 20 | inclusive. |
| 21 | |
| 22 | ## [0.30.9] - 2025-10-28 |
| 23 | |
| 24 | ### Added |
| 25 | |
| 26 | * Added 3D vector `rotate_x`, `rotate_y`, `rotate_z` and `rotate_axis` methods. |
| 27 | |
| 28 | * Added `arbitrary` feature, providing `arbitrary` trait implementations for |
| 29 | `glam` types. |
| 30 | |
| 31 | * Added `zerocopy` feature, providing `zerocopy` trait implementations for |
| 32 | `glam` types. |
| 33 | |
| 34 | ### Changed |
| 35 | |
| 36 | * Made the threshold used in `DQuat::is_near_identity()` more precise, |
| 37 | previously it used the same threshold as `Quat::is_near_identity`. |
| 38 | |
| 39 | ## [0.30.8] - 2025-09-25 |
| 40 | |
| 41 | ### Changed |
| 42 | |
| 43 | * Updates from the rust-gpu project, primarily removing the requirement to use |
| 44 | `repr(simd)` on `spirv`. |
| 45 | |
| 46 | ## [0.30.7] - 2025-09-20 |
| 47 | |
| 48 | ### Changed |
| 49 | |
| 50 | * Reverted change to use `self` in vectors and `&self` in vectors and matrices |
| 51 | as this was a breaking change for some code. |
| 52 | |
| 53 | ## [0.30.6] - 2025-09-18 |
| 54 | |
| 55 | ### Added |
| 56 | |
| 57 | * Added `encase` feature, providing `encase` trait implementations for `glam` |
| 58 | types. |
| 59 | |
| 60 | ### Changed |
| 61 | |
| 62 | * Consistently use `self` for vector and quat methods and `&self` for matrix and |
| 63 | affine methods. |
| 64 | |
| 65 | ## [0.30.5] - 2025-07-26 |
| 66 | |
| 67 | ### Added |
| 68 | |
| 69 | * Added `Vec3::to_vec3a` and `Vec3A::to_vec3` methods. |
| 70 | |
| 71 | ### Fixed |
| 72 | |
| 73 | * Fixed using `bytemuck` feature on `spirv` targets. |
| 74 | |
| 75 | ## [0.30.4] - 2025-06-12 |
| 76 | |
| 77 | ### Added |
| 78 | |
| 79 | * Added 4x4 matrix `frustum_lh`, `frustum_rh` and `frustum_rh_gl` methods. |
| 80 | |
| 81 | * Added assign methods for all corresponding op trait impls (e.g. `add_assign`, |
| 82 | `div_assign`, `mul_assign`, `sub_assign` etc.) |
| 83 | |
| 84 | * Added by reference implementations for all op trait impls. |
| 85 | |
| 86 | ### Changed |
| 87 | |
| 88 | * `bytemuck` trait implementations now use derive macros to catch potentially |
| 89 | misuse. |
| 90 | |
| 91 | ### Fixed |
| 92 | |
| 93 | * Fixed unsoundness in core-simd implementation of `Vec3A` to `[f32;3]` array |
| 94 | and `Vec3A` to `Vec3` conversion. |
| 95 | |
| 96 | * Fixed potential unsoundness in conversion from `Vec4` to |
| 97 | `(f32, f32, f32, f32)` tuple conversion. |
| 98 | |
| 99 | ## [0.30.3] - 2025-05-01 |
| 100 | |
| 101 | ### Added |
| 102 | |
| 103 | * Added `speedy` feature, implementing serialization and deserialization via the |
| 104 | `speedy` crate. |
| 105 | |
| 106 | * Added `fract_gl` to the 'FloatExt' trait which uses the GLSL specification of |
| 107 | `fract`, `self - self.floor()`. |
| 108 | |
| 109 | ## [0.30.2] - 2025-04-13 |
| 110 | |
| 111 | ### Added |
| 112 | |
| 113 | * Added precision conversion functions for affine types: |
| 114 | `Affine3A::as_daffine3`, `DAffine3::as_affine3a`, `Affine2::as_daffine2` and |
| 115 | `DAffine3::as_affine2` |
| 116 | |
| 117 | * Added `normalize_and_length` method to `f32` and `f64` vectors. |
| 118 | |
| 119 | ### Changed |
| 120 | |
| 121 | * Vector min and max scalar implementations have been changed to use an `if` |
| 122 | check instead of the built in Rust floating point primitive `min` and `max` |
| 123 | methods. The Rust methods have special handling for `NaN` propagation however |
| 124 | because this is not consistent between the different SIMD implementations in |
| 125 | glam the most efficient implementation is preferred. |
| 126 | |
| 127 | ## [0.30.1] - 2025-03-20 |
| 128 | |
| 129 | ### Added |
| 130 | |
| 131 | * Added `usize` vector types, `USizeVec2`, `USizeVec3` and `USizeVec4`. |
| 132 | |
| 133 | * Added `min_position` and `max_position` methods for vector types, which return |
| 134 | the index of the min or max element in the vector. |
| 135 | |
| 136 | * Added `rotate_towards` method to 3D vector types. |
| 137 | |
| 138 | ### Changed |
| 139 | |
| 140 | * Removed the small angle check from 2D vector `rotate_towards` implementations |
| 141 | as it was unnecessary and would not preserve the length of the input. |
| 142 | |
| 143 | ## [0.30.0] - 2025-02-18 |
| 144 | |
| 145 | ### Breaking changes |
| 146 | |
| 147 | * The `up` and `dir` vectors passed to affine and matrix `look_to_lh` and |
| 148 | `look_to_rh` methods must now be normalized. This was changed to be consistent |
| 149 | with other methods. |
| 150 | |
| 151 | * Updated the optional `rand` dependency to `0.9` |
| 152 | |
| 153 | * Updated the optional `rkyv` dependency to `0.8` |
| 154 | |
| 155 | ### Added |
| 156 | |
| 157 | * Implemented `rand` `Uniform` distribution trait for all vector types. |
| 158 | |
| 159 | * Added "swizzle assignment" support to vector swizzles, in the form of |
| 160 | `v.with_zx(ivec2(1, 2))` which will return a copy of `v` where the `z` |
| 161 | and `x` components are set to 1 and 2 respectively. |
| 162 | |
| 163 | * Added `Mat3` and `Quat` `look_at_lh` and `look_at_rh` methods. |
| 164 | |
| 165 | * Added `Quat` `look_to_lh` and `look_to_rh` methods. |
| 166 | |
| 167 | * Added 3D vector `slerp` method that performs a spherical linear interpolation |
| 168 | between a source and a target 3D vector. |
| 169 | |
| 170 | * Added `manhattan_distance`, `checked_manhattan_distance` and |
| 171 | `chebyshev_distance` methods to integer vector types which calculates the |
| 172 | Manhattan Distance and the Chebyshev Distance between two vectors. |
| 173 | |
| 174 | * Added 4x4 matrix `from_mat3_translation` method to have parity with the 3D |
| 175 | affine type. |
| 176 | |
| 177 | ### Fixed |
| 178 | |
| 179 | * `Quat::rotate_towards()` now returns the target `Quat` if the angle is small. |
| 180 | Previously `self` was returned which could skip the rotation entirely. |
| 181 | |
| 182 | ## [0.29.2] - 2024-11-05 |
| 183 | |
| 184 | ### Fixed |
| 185 | |
| 186 | * Fix regression in vector `write_to_slice` methods where the destination had to |
| 187 | be the same size as the input, but it should support writing to a slice that |
| 188 | is the same size or larger than the input. |
| 189 | |
| 190 | ## [0.29.1] - 2024-10-30 |
| 191 | |
| 192 | ### Added |
| 193 | |
| 194 | * Added `i8` and `u8` vector types, `I8Vec2`, `I8Vec3`, `I8Vec4`, |
| 195 | `U8Vec2`, `U8Vec3` and `U8Vec4`. |
| 196 | |
| 197 | * Added `Mat4::project_point3a(Vec3A)` method transforming points by |
| 198 | perspective projections. |
| 199 | |
| 200 | ### Changed |
| 201 | |
| 202 | * Removed normalized assertions from quaternion multiplies as sometimes this is |
| 203 | valid. |
| 204 | |
| 205 | * Include `Debug` and `Display` implementations on `spirv` targets. |
| 206 | |
| 207 | * Optimized vector `from_slice` and `write_to_slice` methods. |
| 208 | |
| 209 | * Improved `serde` error messages. |
| 210 | |
| 211 | ## [0.29.0] - 2024-08-20 |
| 212 | |
| 213 | ### Breaking changes |
| 214 | |
| 215 | * `EulerRot` has been reimplemented and now has support for 24 different |
| 216 | rotation order enum values. |
| 217 | |
| 218 | ### Fixed |
| 219 | |
| 220 | * Reduced the dot threshold at which quaternion slerp uses lerp to improve |
| 221 | accuracy. |
| 222 | |
| 223 | ### Added |
| 224 | |
| 225 | * Added 3x3 matrix `from_mat4_minor()` and 2x2 matrix `from_mat3_minor()` |
| 226 | methods. |
| 227 | |
| 228 | * Added `bvec2`, `bvec3`, `bvec3a`, `bvec4` and `bvec4a` vector mask creation |
| 229 | functions. |
| 230 | |
| 231 | * Added all 24 possible intrinsic and extrinsic Euler angle rotation |
| 232 | combinations to `EulerRot` enum. |
| 233 | |
| 234 | * Added `is_finite_mask` method to vector types which returns a vector mask. |
| 235 | |
| 236 | * Added `reflect` and `refract` methods to vector types. |
| 237 | |
| 238 | * Added `to_euler` methods to matrix types which extracts Euler angles from a |
| 239 | rotation matrix for a given `EulerRot`. |
| 240 | |
| 241 | * Added generic `map` method to vector types which applies a functor to all |
| 242 | vector elements. |
| 243 | |
| 244 | * Vector arithmetic ops are now implemented on references. |
| 245 | |
| 246 | ### Changed |
| 247 | |
| 248 | * Vector and quaternion lerp now uses a precise lerp algorithm. |
| 249 | |
| 250 | ## [0.28.0] - 2024-06-10 |
| 251 | |
| 252 | ### Breaking changes |
| 253 | |
| 254 | * Removed derives from `glam::deref` types used by `Deref` on SIMD vector |
| 255 | types. These unintentionally added support for traits like `PartialOrd` to |
| 256 | SIMD vector types. This may break existing code that was depending on this. |
| 257 | Please use `cmple().all()` etc. instead of `PartialOrd` methods. |
| 258 | |
| 259 | * Removed `impl From<Vec4> for Vec3A` as this violated the `From` trait |
| 260 | contract that conversions should be lossless. Please use the explicit |
| 261 | `Vec3A::from_vec4` method instead. |
| 262 | |
| 263 | * Renamed 2D vector `angle_between` to `angle_to` to differentiate from the 3D |
| 264 | `angle_between` which has different semantics to the 2D version. |
| 265 | |
| 266 | ### Added |
| 267 | |
| 268 | * Added aarch64 neon support. |
| 269 | |
| 270 | * Added `rotate_towards` methods for 2D vectors and quaternions. |
| 271 | |
| 272 | * Added `Vec3A::from_vec4` method which can perform a no-op conversion when |
| 273 | SIMD is used. This replaces the `impl From<Vec4> for Vec3A` implementation. |
| 274 | |
| 275 | ## [0.27.0] - 2024-03-23 |
| 276 | |
| 277 | ### Breaking changes |
| 278 | |
| 279 | * Changed implementation of vector `fract` method to match the Rust |
| 280 | implementation instead of the GLSL implementation, that is `self - |
| 281 | self.trunc()` instead of `self - self.floor()`. |
| 282 | |
| 283 | ### Added |
| 284 | |
| 285 | * Added vector `fract_gl` which uses the GLSL specification of `fract`, |
| 286 | `self - self.floor()`. |
| 287 | |
| 288 | ## [0.26.0] - 2024-03-18 |
| 289 | |
| 290 | ### Breaking changes |
| 291 | |
| 292 | * Minimum Supported Rust Version bumped to 1.68.2 for |
| 293 | `impl From<bool> for {f32,f64}` support. |
| 294 | |
| 295 | ### Fixed |
| 296 | |
| 297 | * Respect precision format specifier in Display implementations. Previously it |
| 298 | was ignored. |
| 299 | |
| 300 | * Corrected precision documentation for vector `is_normalized` methods and |
| 301 | changed the internal check to use `2e-4` to better match the documented |
| 302 | precision value of `1e-4`. |
| 303 | |
| 304 | ### Added |
| 305 | |
| 306 | * Added `with_x`, `with_y`, etc. to vector types which returns a copy of |
| 307 | the vector with the new component value. |
| 308 | |
| 309 | * Added `midpoint` method to vector types that returns the point between two |
| 310 | points. |
| 311 | |
| 312 | * Added `move_towards` for float vector types. |
| 313 | |
| 314 | * Added saturating add and sub methods for signed and unsigned integer vector |
| 315 | types. |
| 316 | |
| 317 | * Added element wise sum and product methods for vector types. |
| 318 | |
| 319 | * Added element wise absolute values method for matrix types. |
| 320 | |
| 321 | * Added `from_array` method for boolean vector types. |
| 322 | |
| 323 | * Added `normalize_or` method to vector types that returns the specified value |
| 324 | if normalization failed. |
| 325 | |
| 326 | * Added `From<BVecN>` support for all vector types. |
| 327 | |
| 328 | * Added `Div` and `DivAssign` by scalar implementations to matrix types. |
| 329 | |
| 330 | ## [0.25.0] - 2023-12-19 |
| 331 | |
| 332 | ### Breaking changes |
| 333 | |
| 334 | * Changed `Vec4` to always used `BVec4A` as a mask type, regardless if the |
| 335 | target architecture has SIMD support in glam. Previously this was inconsistent |
| 336 | on different hardware like ARM. This will have a slight performance cost when |
| 337 | SIMD is not available. `Vec4` will continue to use `BVec4` as a mask type when |
| 338 | the `scalar-math` feature is used. |
| 339 | |
| 340 | ### Fixed |
| 341 | |
| 342 | * Made `Affine2` implement the `bytemuck::AnyBitPattern` trait instead of |
| 343 | `bytemuck::Pod` as it contains internal padding due to `Mat2` being 16 byte |
| 344 | aligned. |
| 345 | |
| 346 | * Updated the `core-simd` implementation to build on latest nightly. |
| 347 | |
| 348 | ### Added |
| 349 | |
| 350 | * Added `to_angle` method to 2D vectors. |
| 351 | |
| 352 | * Added `FloatExt` trait which adds `lerp`, `inverse_lerp` and `remap` methods |
| 353 | to `f32` and `f64` types. |
| 354 | |
| 355 | * Added `i16` and `u16` vector types, `I16Vec2`, `I16Vec3`, `I16Vec4`, |
| 356 | `U16Vec2`, `U16Vec3` and `U16Vec4`. |
| 357 | |
| 358 | ### Changed |
| 359 | |
| 360 | * Renamed `Quat::as_f64()` to `Quat::as_dquat()` and `DQuat::as_f32()` to |
| 361 | `DQuat::as_quat()` to be consistent with other types. The old methods have |
| 362 | been deprecated. |
| 363 | |
| 364 | * Added the `#[must_use]` attribute to all pure functions following the |
| 365 | guidelines for the Rust standard library. |
| 366 | |
| 367 | ## [0.24.2] - 2023-09-23 |
| 368 | |
| 369 | ### Fixed |
| 370 | |
| 371 | * Fixed singularities in `Quat::to_euler`. |
| 372 | |
| 373 | ### Added |
| 374 | |
| 375 | * Added `div_euclid` and `rem_euclid` to integer vector types. |
| 376 | |
| 377 | * Added wrapping and saturating arithmetic operations to integer vector types. |
| 378 | |
| 379 | * Added `to_scale_angle_translation` to 2D affine types. |
| 380 | |
| 381 | * Added `mul_assign` ops to affine types. |
| 382 | |
| 383 | ### Changed |
| 384 | |
| 385 | * Disable default features on optional `rkyv` dependency. |
| 386 | |
| 387 | ## [0.24.1] - 2023-06-24 |
| 388 | |
| 389 | ### Added |
| 390 | |
| 391 | * Implemented missing `bytemuck`, `mint`, `rand`, `rkyv` and `serde` traits for |
| 392 | `i64` and `u64` types. |
| 393 | |
| 394 | * Added missing safe `From` conversions from `f32` vectors to `f64` vectors. |
| 395 | |
| 396 | * Added `TryFrom` implementations between different vector types. |
| 397 | |
| 398 | * Added `test` and `set` methods to `bool` vector types for testing and setting |
| 399 | individual mask elements. |
| 400 | |
| 401 | * Added `MIN`, `MAX`, `INFINITY` and `NEG_INFINITY` vector constants. |
| 402 | |
| 403 | ## [0.24.0] - 2023-04-24 |
| 404 | |
| 405 | ### Breaking changes |
| 406 | |
| 407 | * Enabling `libm` in a `std` build now overrides the `std` math functions. This |
| 408 | is unlikely to break anything but it is a change in behavior. |
| 409 | |
| 410 | ### Added |
| 411 | |
| 412 | * Added `i64` and `u64` vector types; `I64Vec2`, `I64Vec3`, `I64Vec4`, |
| 413 | `U64Vec2`, `U64Vec3` and `U64Vec4`. |
| 414 | |
| 415 | * Added `length_squared` method on signed and unsigned integer vector types. |
| 416 | |
| 417 | * Added `distance_squared` method on signed integer vector types. |
| 418 | |
| 419 | * Implemented the `bytemuck` `AnyBitPattern` trait on `Vec3A`, `Mat3A` and |
| 420 | `Affine3A`. |
| 421 | |
| 422 | ### Changed |
| 423 | |
| 424 | * Changed quaternion `to_axis_angle` for improved numerical stability. |
| 425 | |
| 426 | ### Removed |
| 427 | |
| 428 | * Removed dependency on `serde_derive` for improved compile times when using |
| 429 | `serde`. |
| 430 | |
| 431 | ## [0.23.0] - 2023-02-22 |
| 432 | |
| 433 | ### Breaking changes |
| 434 | |
| 435 | * When the `scalar-math` feature is enabled the vector mask type for `Vec3A` was |
| 436 | changed from `BVec3` to `BVec3A`. |
| 437 | |
| 438 | ### Added |
| 439 | |
| 440 | * Added `copysign` method to signed vector types. |
| 441 | |
| 442 | ## [0.22.0] - 2022-10-24 |
| 443 | |
| 444 | ### Breaking changes |
| 445 | |
| 446 | * Added `u32` implementation of `BVec3A` and `BVec4` when SIMD is not available. |
| 447 | These are used instead of aliasing to the `bool` implementations. |
| 448 | |
| 449 | * Removed `Add`, `Sub`, and scalar `Mul` implementations from affine types as |
| 450 | they didn't make sense on these types. |
| 451 | |
| 452 | * Removed deprecated `const_*` macros. These have been replaced by `const fn` |
| 453 | methods. |
| 454 | |
| 455 | ### Fixed |
| 456 | |
| 457 | * Fixed `neg` and `signum` to consistently handle negative zero across multiple |
| 458 | platforms. |
| 459 | |
| 460 | * Removed `register_attr` feature usage for SPIR-V targets. |
| 461 | |
| 462 | ### Added |
| 463 | |
| 464 | * Added missing `Serialize`, `Deserialize` and `PartialEq` implementations. |
| 465 | |
| 466 | * Added `Sum<Self>` and `Product<Self>` implementations for all vector, matrix |
| 467 | and quaternion types. |
| 468 | |
| 469 | * Added 4x4 matrix methods `look_to_lh` and `look_to_rh`. These were previously |
| 470 | private. |
| 471 | |
| 472 | * Added `dot_into_vec` methods to vector which returns the result of the dot |
| 473 | product splatted to all vector lanes. |
| 474 | |
| 475 | * Added `is_negative_bitmask` to vector types which returns a `u32` of bits for |
| 476 | each negative vector lane. |
| 477 | |
| 478 | * Added `splat` method and `TRUE` and `FALSE` constants to all `BVec` types. |
| 479 | |
| 480 | * Added `from_mat3a` methods to `Affine2`, `Mat2`, `Mat4` and `Quat` types. |
| 481 | |
| 482 | ### Changed |
| 483 | |
| 484 | * Disable `serde` default features. |
| 485 | |
| 486 | * Made `to_cols_array`, `to_cols_array_2d`, and `from_diagonal` methods |
| 487 | `const fn`. |
| 488 | |
| 489 | ## [0.21.3] - 2022-08-02 |
| 490 | |
| 491 | ### Fixed |
| 492 | |
| 493 | * Fixed `glam_assert` being too restrictive in matrix transform point and |
| 494 | transform vector methods. |
| 495 | |
| 496 | ### Added |
| 497 | |
| 498 | * Added experimental `core-simd` feature which enables SIMD support via the |
| 499 | unstable `core::simd` module. |
| 500 | |
| 501 | ### Changed |
| 502 | |
| 503 | * Derive from `PartialEq` and `Eq` instead of providing a trait implementation |
| 504 | for all non SIMD types. |
| 505 | |
| 506 | ## [0.21.2] - 2022-06-25 |
| 507 | |
| 508 | ### Fixed |
| 509 | |
| 510 | * Restore missing `$crate::` prefix in deprecated `const_*` macros. |
| 511 | |
| 512 | * Fixed some performance regressions in affine and matrix determinant and |
| 513 | inverses due to lack of inlining. |
| 514 | |
| 515 | * Fixed some performance regressions in the SSE2 `Vec3A` to `Vec3` from |
| 516 | conversion. |
| 517 | |
| 518 | ### Added |
| 519 | |
| 520 | * Implemented `BitXor` and `BitXorAssign` traits for `bool` vectors. |
| 521 | |
| 522 | ## [0.21.1] - 2022-06-22 |
| 523 | |
| 524 | ### Fixed |
| 525 | |
| 526 | * Fix compilation when FMA support is enabled. |
| 527 | |
| 528 | ## [0.21.0] - 2022-06-22 |
| 529 | |
| 530 | ### Breaking changes |
| 531 | |
| 532 | * Minimum Supported Version of Rust bumped to 1.58.1 to allow `const` pointer |
| 533 | dereferences in constant evaluation. |
| 534 | |
| 535 | * The `abs_diff_eq` method on `Mat2` and `DMat2` now takes `other` by value |
| 536 | instead of reference. This is consistent with the other matrix types. |
| 537 | |
| 538 | * The `AsMut` and `Deref` trait implementations on `Quat` and `DQuat` was |
| 539 | removed. Quaternion fields are now public. |
| 540 | |
| 541 | * The `AsRef` trait implementations were removed from `BVec2`, `BVec3`, |
| 542 | `BVec3A`, `BVec4` and `BVec4A`. |
| 543 | |
| 544 | ### Added |
| 545 | |
| 546 | * `NEG_ONE` constant was added to all signed vector types. |
| 547 | |
| 548 | * `NEG_X`, `NEG_Y`, `NEG_Z` and `NEG_W` negative axis vectors were added to |
| 549 | signed vector types. |
| 550 | |
| 551 | * The `rotate` and `from_angle` methods were added to `Vec2` and `DVec2`. |
| 552 | `from_angle` returns a 2D vector containing `[angle.cos(), angle.sin()]` that |
| 553 | can be used to `rotate` another 2D vector. |
| 554 | |
| 555 | * The `from_array` `const` function was added to all vector types. |
| 556 | |
| 557 | ### Changed |
| 558 | |
| 559 | * Source code is now largely generated. This removes most usage of macros |
| 560 | internally to improve readability. There should be no change in API or |
| 561 | behavior other than what is documented here. |
| 562 | |
| 563 | * Many methods have been made `const fn`: |
| 564 | * `new`, `splat`, `from_slice`, `to_array` and `extend` on vector types |
| 565 | * `from_cols`, `from_cols_array`, `from_cols_array_2d`, `from_cols_slice` on |
| 566 | matrix types |
| 567 | * `from_xyzw` and `from_array` on quaternion types |
| 568 | * `from_cols` on affine types |
| 569 | |
| 570 | * The `const` new macros where deprecated. |
| 571 | |
| 572 | ### Removed |
| 573 | |
| 574 | * Deleted deprecated `TransformRT` and `TransformSRT` types. |
| 575 | |
| 576 | ## [0.20.5] - 2022-04-12 |
| 577 | |
| 578 | ### Fixed |
| 579 | |
| 580 | * Fixed a bug in the scalar implementation of 4D vector `max_element` method |
| 581 | where the `w` element check was incorrect. |
| 582 | |
| 583 | ## [0.20.4] - 2022-04-11 |
| 584 | |
| 585 | ### Fixed |
| 586 | |
| 587 | * Fixed a bug with quaternion `slerp` with a rotation of tau. |
| 588 | |
| 589 | ## [0.20.3] - 2022-03-28 |
| 590 | |
| 591 | ### Added |
| 592 | |
| 593 | * Added `to_array()` to `Quat` and `DQuat`. |
| 594 | * Added `mul_add` method to all vector types - note that this will be slower |
| 595 | without hardware support enabled. |
| 596 | * Added the `fast-math` flag which will sacrifice some float determinism for |
| 597 | speed. |
| 598 | |
| 599 | ### Fixed |
| 600 | |
| 601 | * Fixed a bug in the `sse2` and `wasm32` implementations of |
| 602 | `Mat4::determinant()`. |
| 603 | |
| 604 | ## [0.20.2] - 2021-12-20 |
| 605 | |
| 606 | ### Fixed |
| 607 | |
| 608 | * Fixed SPIR-V build which was broken due to a typo. |
| 609 | |
| 610 | ## [0.20.1] - 2021-11-23 |
| 611 | |
| 612 | ### Added |
| 613 | |
| 614 | * Added the `from_rotation_arc_2d()` method to `Quat` and `DQuat` which will |
| 615 | return a rotation between two 2D vectors around the z axis. |
| 616 | * Added impl of `Neg` operator for matrix types. |
| 617 | * Added `cuda` feature which forces `glam` types to match cuda's alignment |
| 618 | requirements. |
| 619 | |
| 620 | ### Changed |
| 621 | |
| 622 | * The `Quat` and `DQuat` methods `from_rotation_arc()` and |
| 623 | `from_rotation_arc_colinear()` are now available in `no_std`. |
| 624 | * The `Vec3` and `DVec3` methods `any_orthogonal_vector()`, |
| 625 | `any_orthonormal_vector()` and `any_orthonormal_pair()` are now available in |
| 626 | `no_std`. |
| 627 | * Added `repr(C)` attribute to affine types. |
| 628 | |
| 629 | ### Removed |
| 630 | |
| 631 | * Removed deprecated `as_f32()`, `as_f64()`, `as_i32()` and `as_u32()` methods. |
| 632 | |
| 633 | ## [0.20.0] - 2021-11-01 |
| 634 | |
| 635 | ### Breaking changes |
| 636 | |
| 637 | * Minimum Supported Version of Rust bumped to 1.52.1 for an update to the `mint` |
| 638 | crate. |
| 639 | |
| 640 | ### Added |
| 641 | |
| 642 | * Added implementations for new `IntoMint` trait from the `mint` crate. |
| 643 | * Added `mint` conversions for `Mat3A`. |
| 644 | * Added `as_vec3a` cast methods to vector types. |
| 645 | |
| 646 | ## [0.19.0] - 2021-10-05 |
| 647 | |
| 648 | ### Breaking changes |
| 649 | |
| 650 | * Removed truncating vector `From` implementations. Use `.truncate()` or swizzle |
| 651 | methods instead. |
| 652 | |
| 653 | ### Added |
| 654 | |
| 655 | * Added `Not`, `Shl`, `Shr`, `BitAnd`, `BitOr` and `BitXor` implementations for |
| 656 | all `IVec` and `UVec` vector types. |
| 657 | * Added `NAN` constant for all types. |
| 658 | * Documented `glam`'s [architecture](ARCHITECTURE.md). |
| 659 | |
| 660 | ### Changed |
| 661 | |
| 662 | * `Sum` and `Product` traits are now implemented in `no_std` builds. |
| 663 | |
| 664 | ## [0.18.0] - 2021-08-26 |
| 665 | |
| 666 | ### Breaking changes |
| 667 | |
| 668 | * Minimum Supported Version of Rust bumped to 1.51.0 for `wasm-bindgen-test` |
| 669 | and `rustdoc` `alias` support. |
| 670 | |
| 671 | ### Added |
| 672 | |
| 673 | * Added `wasm32` SIMD intrinsics support. |
| 674 | * Added optional support for the `rkyv` serialization crate. |
| 675 | * Added `Rem` and `RemAssign` implementations for all vector types. |
| 676 | * Added quaternion `xyz()` method for returning the vector part of the |
| 677 | quaternion. |
| 678 | * Added `From((Scalar, Vector3))` for 4D vector types. |
| 679 | |
| 680 | ### Changed |
| 681 | |
| 682 | * Deprecated `as_f32()`, `as_f64()`, `as_i32()` and `as_u32()` methods in favor |
| 683 | of more specific methods such as `as_vec2()`, `as_dvec2()`, `as_ivec2()` and |
| 684 | `as_uvec2()` and so on. |
| 685 | |
| 686 | ## [0.17.3] - 2021-07-18 |
| 687 | |
| 688 | ### Fixed |
| 689 | |
| 690 | * Fix alignment unit tests on non x86 platforms. |
| 691 | |
| 692 | ## [0.17.2] - 2021-07-15 |
| 693 | |
| 694 | ### Fixed |
| 695 | |
| 696 | * Fix alignment unit tests on i686 and S390x. |
| 697 | |
| 698 | ## [0.17.1] - 2021-06-29 |
| 699 | |
| 700 | ### Added |
| 701 | |
| 702 | * Added `serde` support for `Affine2`, `DAffine2`, `Affine3A` and `DAffine3`. |
| 703 | |
| 704 | ## [0.17.0] - 2021-06-26 |
| 705 | |
| 706 | ### Breaking changes |
| 707 | |
| 708 | * The addition of `Add` and `Sub` implementations of scalar values for vector |
| 709 | types may create ambiguities with existing calls to `add` and `sub`. |
| 710 | * Removed `From<Mat3>` implementation for `Mat2` and `From<DMat3>` for `DMat2`. |
| 711 | These have been replaced by `Mat2::from_mat3()` and `DMat2::from_mat3()`. |
| 712 | * Removed `From<Mat4>` implementation for `Mat3` and `From<DMat4>` for `DMat3`. |
| 713 | These have been replaced by `Mat3::from_mat4()` and `DMat3::from_mat4()`. |
| 714 | * Removed deprecated `from_slice_unaligned()`, `write_to_slice_unaligned()`, |
| 715 | `from_rotation_mat4` and `from_rotation_ypr()` methods. |
| 716 | |
| 717 | ### Added |
| 718 | |
| 719 | * Added `col_mut()` method which returns a mutable reference to a matrix column |
| 720 | to all matrix types. |
| 721 | * Added `AddAssign`, `MulAssign` and `SubAssign` implementations for all matrix |
| 722 | types. |
| 723 | * Added `Add` and `Sub` implementations of scalar values for vector types. |
| 724 | * Added more `glam_assert!` checks and documented methods where they are used. |
| 725 | * Added vector projection and rejection methods `project_onto()`, |
| 726 | `project_onto_normalized()`, `reject_from()` and `reject_from_normalized()`. |
| 727 | * Added `Mat2::from_mat3()`, `DMat2::from_mat3()`, `Mat3::from_mat4()`, |
| 728 | `DMat3::from_mat4()` which create a smaller matrix from a larger one, |
| 729 | discarding a final row and column of the input matrix. |
| 730 | * Added `Mat3::from_mat2()`, `DMat3::from_mat2()`, `Mat4::from_mat3()` and |
| 731 | `DMat4::from_mat3()` which create an affine transform from a smaller linear |
| 732 | transform matrix. |
| 733 | |
| 734 | ### Changed |
| 735 | |
| 736 | * Don't support `AsRef` and `AsMut` on SPIR-V targets. Also removed SPIR-V |
| 737 | support for some methods that used `as_ref()`, including `hash()`. Not a |
| 738 | breaking change as these methods would not have worked anyway. |
| 739 | |
| 740 | ### Fixed |
| 741 | |
| 742 | * Fixed compile time alignment checks failing on i686 targets. |
| 743 | |
| 744 | ## [0.16.0] - 2021-06-06 |
| 745 | |
| 746 | ### Breaking changes |
| 747 | |
| 748 | * `sprirv-std` dependency was removed, rust-gpu depends on glam internally |
| 749 | again for now. |
| 750 | * Added `must_use` attribute to all `inverse()`, `normalize()`, |
| 751 | `try_normalize()`, `transpose()` and `conjugate()` methods. |
| 752 | |
| 753 | ### Added |
| 754 | |
| 755 | * Added `fract()` method to float vector types which return a vector containing |
| 756 | `self - self.floor()`. |
| 757 | * Added optional support for the `approx` crate. Note that all glam types |
| 758 | implement their own `abs_diff_eq()` method without requiring the `approx` |
| 759 | dependency. |
| 760 | |
| 761 | ## [0.15.2] - 2021-05-20 |
| 762 | |
| 763 | ### Added |
| 764 | |
| 765 | * Added `from_cols()` methods to affine types. |
| 766 | * Added methods for reading and writing affine types from and to arrays and |
| 767 | slices, including `from_cols_array()`, `to_cols_array()`, |
| 768 | `from_cols_array_2d()`, `to_cols_array_2d()`, `from_cols_slice()` and |
| 769 | `write_cols_to_slice()`. |
| 770 | * Added `core::fmt::Display` trait implementations for affine types. |
| 771 | * Added `core::ops::Add`, `core::ops::Mul` scalar and `core::ops::Sub` trait |
| 772 | implementations for affine types. |
| 773 | * Added `from_array()` methods to quaternion types. |
| 774 | |
| 775 | ### Changed |
| 776 | |
| 777 | * Renamed vector and quaternion `from_slice_unaligned()` and |
| 778 | `write_to_slice_unaligned()` methods to `from_slice()` and |
| 779 | `write_to_slice()`. |
| 780 | * Removed usage of `_mm_rcp_ps` from SSE2 implementation of `Quat::slerp` as |
| 781 | this instruction is not deterministic between Intel and AMD chips. |
| 782 | |
| 783 | ## [0.15.1] - 2021-05-14 |
| 784 | |
| 785 | ### Changed |
| 786 | |
| 787 | * Disable `const_assert_eq!` size and alignment checks for SPIR-V targets. |
| 788 | |
| 789 | ## [0.15.0] - 2021-05-14 |
| 790 | |
| 791 | ### Breaking changes |
| 792 | |
| 793 | * Removed `PartialOrd` and `Ord` trait implementations for all `glam` types. |
| 794 | * Removed deprecated `zero()`, `one()`, `unit_x()`, `unit_y()`, `unit_z()`, |
| 795 | `unit_w()`, `identity()` and `Mat2::scale()` methods. |
| 796 | * Remove problematic `Quat` `From` trait conversions which would allow creating |
| 797 | a non-uniform quaternion without necessarily realizing, including from |
| 798 | `Vec4`, `(x, y, z, w)` and `[f32; 4]`. |
| 799 | |
| 800 | ### Added |
| 801 | |
| 802 | * Added `EulerRot` enum for specifying Euler rotation order and |
| 803 | `Quat::from_euler()`, `Mat3::from_euler()` and `Mat4::from_euler()` which |
| 804 | support specifying a rotation order and angles of rotation. |
| 805 | * Added `Quat::to_euler()` method for extracting Euler angles. |
| 806 | * Added `Quat::from_vec4()` which is an explicit method for creating a |
| 807 | quaternion from a 4D vector. The method does not normalize the resulting |
| 808 | quaternion. |
| 809 | * Added `Mat3A` type which uses `Vec3A` columns. It is 16 byte aligned and |
| 810 | contains internal padding but it generally faster than `Mat3` for most |
| 811 | operations if SIMD is available. |
| 812 | * Added 3D affine transform types `Affine3A` and `DAffine3`. These are more |
| 813 | efficient than using `Mat4` and `DMat4` respectively when working with 3D |
| 814 | affine transforms. |
| 815 | * Added 2D affine transform types `Affine2` and `DAffine2`. These are more |
| 816 | efficient than using `Mat3` and `DMat3` respectively when working with 2D |
| 817 | affine transforms. |
| 818 | * Added `Quat::from_affine3()` to create a quaternion from an affine transform |
| 819 | rotation. |
| 820 | * Added explicit `to_array()` method to vector types to better match the matrix |
| 821 | methods. |
| 822 | |
| 823 | ### Changed |
| 824 | |
| 825 | * Deprecated `Quat::from_rotation_ypr()`, `Mat3::from_rotation_ypr()` and |
| 826 | `Mat4::from_rotation_ypr()` in favor of new `from_euler()` methods. |
| 827 | * Deprecated `Quat::from_rotation_mat3()` and `Quat::from_rotation_mat4()` in |
| 828 | favor of new `from_mat3` and `from_mat4` methods. |
| 829 | * Deprecated `TransformSRT` and `TransformRT` which are under the |
| 830 | `transform-types` feature. These will be moved to a separate experimental |
| 831 | crate. |
| 832 | * Updated `spirv-std` dependency version to `0.4.0-alpha7`. |
| 833 | |
| 834 | ## [0.14.0] - 2021-04-09 |
| 835 | |
| 836 | ### Breaking changes |
| 837 | |
| 838 | * Minimum Supported Version of Rust bumped to 1.45.0 for the `spirv-std` |
| 839 | dependency. |
| 840 | |
| 841 | ### Added |
| 842 | |
| 843 | * Added `AXES[]` constants to all vector types. These are arrays containing the |
| 844 | unit vector for each axis. |
| 845 | * Added quaternion `from_scaled_axis` and `to_scaled_axis` methods. |
| 846 | |
| 847 | ### Changed |
| 848 | |
| 849 | * Updated dependency versions of `bytemuck` to `1.5`, `rand` to `0.8`, |
| 850 | `rand_xoshiro` to `0.6` and `spirv-std` to `0.4.0-alpha4`. |
| 851 | |
| 852 | ## [0.13.1] - 2021-03-24 |
| 853 | |
| 854 | ### Added |
| 855 | |
| 856 | * Added vector `clamp()` functions. |
| 857 | * Added matrix column and row accessor methods, `col()` and `row()`. |
| 858 | * Added SPIR-V module and dependency on `spirv-std` for the SPIR-V target. |
| 859 | * Added matrix truncation from 4x4 to 3x3 and 3x3 to 2x2 via `From` impls. |
| 860 | |
| 861 | ### Changed |
| 862 | |
| 863 | * Documentation corrections and improvements. |
| 864 | |
| 865 | ## [0.13.0] - 2021-03-04 |
| 866 | |
| 867 | ### Breaking Changes |
| 868 | |
| 869 | * The behavior of the 4x4 matrix method `transform_point3()` was changed to not |
| 870 | perform the perspective divide. This is an optimization for use with affine |
| 871 | transforms where perspective correction is not required. The |
| 872 | `project_point3()` method was added for transforming points by perspective |
| 873 | projections. |
| 874 | * The 3x3 matrix `from_scale()` method was changed to |
| 875 | create a affine transform containing a 2-dimensional non-uniform scale to be |
| 876 | consistent with the 4x4 matrix version. The |
| 877 | `from_diagonal()` method can be used to create a 3x3 scale matrix. |
| 878 | * The 3x3 matrix methods `transform_point2_as_vec3a`, |
| 879 | `transform_vector2_as_vec3a` and `mul_vec3_as_vec3a` were unintentionally |
| 880 | `pub` and are no longer publicly accessible. |
| 881 | |
| 882 | ### Added |
| 883 | |
| 884 | * Added `Vec2::X`, `Vec4::W` etc constants as a shorter versions of `unit_x()` |
| 885 | and friends. |
| 886 | * Added `ONE` constants for vectors. |
| 887 | * Added `IDENTITY` constants for `Mat2`, `Mat3`, `Mat4` and `Quat`. |
| 888 | * Added `ZERO` constant for vectors and matrices. |
| 889 | * Added `clamp_length()`, `clamp_length_max()`, and `clamp_length_min` methods |
| 890 | for `f32` and `f64` vector types. |
| 891 | * Added `try_normalize()` and `normalize_or_zero()` for all real vector types. |
| 892 | * Added `from_diagonal()` methods to all matrix types for creating diagonal |
| 893 | matrices from a vector. |
| 894 | * Added `angle_between()`, `from_rotation_arc()` and |
| 895 | `from_rotation_arc_colinear()` to quaternion types. |
| 896 | * Added quaternion `inverse()` which assumes the quaternion is already |
| 897 | normalized and returns the conjugate. |
| 898 | * Added `from_translation()` and `from_angle()` methods to 3x3 matrix types. |
| 899 | * Added `project_point3()` method to 4x4 matrix types. This method is for |
| 900 | transforming 3D vectors by perspective projection transforms. |
| 901 | * Added `Eq` and `Hash` impls for integer vector types. |
| 902 | |
| 903 | ### Changed |
| 904 | |
| 905 | * Deprecated `::unit_x/y/z()`, `::zero()`, `::one()`, `::identity()` functions |
| 906 | in favor of constants. |
| 907 | |
| 908 | ## [0.12.0] - 2021-01-15 |
| 909 | |
| 910 | ### Breaking Changes |
| 911 | |
| 912 | * `Vec2Mask`, `Vec3Mask` and `Vec4Mask` have been replaced by `BVec2`, `BVec3`, |
| 913 | `BVec3A`, `BVec4` and `BVec4A`. These types are used by some vector methods |
| 914 | and are not typically referenced directly. |
| 915 | |
| 916 | ### Added |
| 917 | |
| 918 | * Added `f64` primitive type support |
| 919 | * vectors: `DVec2`, `DVec3` and `DVec4` |
| 920 | * square matrices: `DMat2`, `DMat3` and `DMat4` |
| 921 | * a quaternion type: `DQuat` |
| 922 | * Added `i32` primitive type support |
| 923 | * vectors: `IVec2`, `IVec3` and `IVec4` |
| 924 | * Added `u32` primitive type support |
| 925 | * vectors: `UVec2`, `UVec3` and `UVec4` |
| 926 | * Added `bool` primitive type support |
| 927 | * vectors: `BVec2`, `BVec3` and `BVec4` |
| 928 | |
| 929 | ### Removed |
| 930 | |
| 931 | * `build.rs` has been removed. |
| 932 | |
| 933 | ## [0.11.3] - 2020-12-29 |
| 934 | |
| 935 | ### Changed |
| 936 | |
| 937 | * Made `Vec3` `repr(simd)` for `spirv` targets. |
| 938 | |
| 939 | ### Added |
| 940 | |
| 941 | * Added `From<(Vec2, f32)>` for `Vec3` and `From<(Vec3, f32)` for `Vec4`. |
| 942 | |
| 943 | ## [0.11.2] - 2020-12-04 |
| 944 | |
| 945 | ### Changed |
| 946 | |
| 947 | * Compilation fixes for Rust 1.36.0. |
| 948 | |
| 949 | ## [0.11.1] - 2020-12-03 |
| 950 | |
| 951 | ### Added |
| 952 | |
| 953 | * Added support for the [Rust GPU](https://github.com/EmbarkStudios/rust-gpu) |
| 954 | SPIR-V target architecture. |
| 955 | |
| 956 | ## [0.11.0] - 2020-11-26 |
| 957 | |
| 958 | ### Added |
| 959 | |
| 960 | * Added `is_finite` method to all types which returns `true` if, and only if, |
| 961 | all contained elements are finite. |
| 962 | * Added `exp` and `powf` methods for all vector types. |
| 963 | |
| 964 | ### Changed |
| 965 | |
| 966 | * The `is_nan` method now returns a `bool` to match the new `is_finite` method |
| 967 | and to be consistent with the same methods on the `f32` and `f64` primitive |
| 968 | types. |
| 969 | * Renamed `is_nan` which returns a vector mask to `is_nan_mask`. |
| 970 | * Don't use the `cfg` definitions added by `build.rs` for defining structs as |
| 971 | `rust-analyzer` is not aware of them. |
| 972 | |
| 973 | ### Removed |
| 974 | |
| 975 | * Removed deprecated accessor methods. |
| 976 | |
| 977 | ## [0.10.2] - 2020-11-17 |
| 978 | |
| 979 | ### Changed |
| 980 | |
| 981 | * Deprecated element accessor members `.x()`, `.x_mut()`, `.set_x()`, etc. on |
| 982 | vector and quaternion types. |
| 983 | * Deprecated column accessor members `.x_axis()`, `.x_axis_mut()`, |
| 984 | `.set_x_axis()`, etc. on matrix types. |
| 985 | |
| 986 | ## [0.10.1] - 2020-11-15 |
| 987 | |
| 988 | ### Added |
| 989 | |
| 990 | * Added the `Vec2::perp` method which returns a `Vec2` perpendicular to `self`. |
| 991 | |
| 992 | ### Changed |
| 993 | |
| 994 | * `Vec2` and `Vec3` types were changed to use public named fields for `.x`, |
| 995 | `.y`, and `.z` instead of accessors. |
| 996 | * `Quat`, `Vec3A` and `Vec4` implement `Deref` and `DerefMut` for the new `XYZ` |
| 997 | and `XYZW` structs to emulate public named field access. |
| 998 | * `Mat3` and `Mat4` had their axis members made public instead of needing |
| 999 | accessors. |
| 1000 | * `Mat2` implements `Deref` and `DerefMut` for the new `XYAxes` struct to |
| 1001 | emulate public named field access. |
| 1002 | |
| 1003 | ### Removed |
| 1004 | |
| 1005 | * Removed deprecated `length_reciprocal` and `sign` methods. |
| 1006 | |
| 1007 | ### Fixed |
| 1008 | |
| 1009 | * Adding `glam` as a `no_std` dependency should now work as expected. |
| 1010 | |
| 1011 | ## [0.10.0] - 2020-10-31 |
| 1012 | |
| 1013 | ### Breaking Changes |
| 1014 | |
| 1015 | * Changed the return type of `Vec4::truncate` from `Vec3A` to `Vec3`. |
| 1016 | |
| 1017 | ### Added |
| 1018 | |
| 1019 | * Added `From` implementations to truncate to narrower vector types, e.g. |
| 1020 | `Vec4` to `Vec3A`, `Vec3` and `Vec2` and from `Vec3A` and `Vec3` to `Vec2`. |
| 1021 | * Added swizzles for `Vec4`, `Vec3A`, `Vec3` and `Vec2`. These can be used to |
| 1022 | reorder elements in the same type and also to create larger or smaller |
| 1023 | vectors from the given vectors elements. |
| 1024 | * Added `Quat` operators `Add<Quat>`, `Sub<Quat>`, `Mul<f32>` and `Div<f32`. |
| 1025 | These are used by other crates for interpolation quaternions along splines. |
| 1026 | Note that these operations will not return unit length quaternions, thus the |
| 1027 | results must be normalized before performing other `Quat` operations. |
| 1028 | * Added `Mat4::transform_point3a` and `Mat4::transform_vector3a`. |
| 1029 | * Added `AsRef<[f32; 9]>` and `AsMut<[f32; 9]>` trait implementations to `Mat3`. |
| 1030 | * Added optional `bytemuck` support primarily for casting types to `&[u8]`. |
| 1031 | * Added support for compiling with `no_std` by disabling the default `std` |
| 1032 | feature and adding the `libm` feature. |
| 1033 | * Added `distance` and `distance_squared` methods to `Vec2`, `Vec3`, `Vec3A` |
| 1034 | and `Vec4`. |
| 1035 | |
| 1036 | ## [0.9.5] - 2020-10-10 |
| 1037 | |
| 1038 | ### Added |
| 1039 | |
| 1040 | * `glam` uses SSE2 for some types which prevents constructor functions can not |
| 1041 | be made `const fn`. To work around this limitation the following macro |
| 1042 | functions have been added to support creating `const` values of `glam` types: |
| 1043 | `const_mat2`, `const_mat3`, `const_mat4`, `const_quat`, `const_vec2`, |
| 1044 | `const_vec3`, `const_vec3a` and `const_vec4`. |
| 1045 | * Added `is_nan` methods to `Vec2`, `Vec3`, `Vec3A` and `Vec4` which return a |
| 1046 | mask. |
| 1047 | |
| 1048 | ## Changed |
| 1049 | |
| 1050 | * Renamed the vector `reciprocal` and `length_reciprocal` methods to `recip` |
| 1051 | and `length_recip` to match the Rust standard library naming. The old methods |
| 1052 | have been deprecated. |
| 1053 | * Renamed the vector `sign` methods to `signum` match the Rust standard library |
| 1054 | naming. The new methods now check for `NAN`. The old methods have been |
| 1055 | deprecated. |
| 1056 | * Added SSE2 optimized implementations of `Mat4::determinant` and |
| 1057 | `Mat4::inverse`. |
| 1058 | |
| 1059 | ### Removed |
| 1060 | |
| 1061 | * Removed deprecated function `Mat4::perspective_glu_rh`. |
| 1062 | |
| 1063 | ## [0.9.4] - 2020-08-31 |
| 1064 | |
| 1065 | ### Fixed |
| 1066 | |
| 1067 | * Fixed `Mat4::transform_point3` to account for homogeneous w coordinate. |
| 1068 | Previously this would have been incorrect when the resulting homogeneous |
| 1069 | coordinate was not 1.0, e.g. when transforming by a perspective projection. |
| 1070 | * Fixed `Mat3::transform_point2` to account for homogeneous z coordinate. |
| 1071 | |
| 1072 | ## [0.9.3] - 2020-08-11 |
| 1073 | |
| 1074 | ### Added |
| 1075 | |
| 1076 | * Added `Mat4::perspective_rh`. |
| 1077 | |
| 1078 | ## [0.9.2] - 2020-07-09 |
| 1079 | |
| 1080 | ### Added |
| 1081 | |
| 1082 | * Added `Mat3::mul_vec3a` and `Quat::mul_vec3a`. |
| 1083 | |
| 1084 | ### Changed |
| 1085 | |
| 1086 | * Changed `Quat::mul_vec3` to accept and return `Vec3` instead of `Vec3A`. |
| 1087 | |
| 1088 | ## [0.9.1] - 2020-07-01 |
| 1089 | |
| 1090 | ### Added |
| 1091 | |
| 1092 | * Added `Mat3 * Vec3A` implementation. |
| 1093 | * Added `Vec3A` benches. |
| 1094 | |
| 1095 | ### Changed |
| 1096 | |
| 1097 | * Some documentation improvements around the new `Vec3A` type. |
| 1098 | |
| 1099 | ## [0.9.0] - 2020-06-28 |
| 1100 | |
| 1101 | ### Added |
| 1102 | |
| 1103 | * `Vec3` has been split into scalar `Vec3` and 16 byte aligned `Vec3A` types. |
| 1104 | Only the `Vec3A` type currently uses SIMD optimizations. |
| 1105 | * `Vec3Mask` has been split into scalar `Vec3Mask` and 16 byte aligned |
| 1106 | `Vec3AMask` types. |
| 1107 | * Added `mut` column accessors to all matrix types, e.g. `Mat2::x_axis_mut()`. |
| 1108 | * Added `From` trait implementations for `Vec3AMask` and `Vec4Mask` to `__m128`. |
| 1109 | |
| 1110 | ### Changed |
| 1111 | |
| 1112 | * The `Mat3` type is using the scalar `Vec3` type for storage. |
| 1113 | * Simplified `Debug` trait output for `Quat`, `Vec4` and `Vec3A`. |
| 1114 | |
| 1115 | ## Removed |
| 1116 | |
| 1117 | * Removed the `packed-vec3` feature flag as it is now redundant. |
| 1118 | |
| 1119 | ## [0.8.7] - 2020-04-28 |
| 1120 | |
| 1121 | ### Added |
| 1122 | |
| 1123 | * Added `Quat::slerp` - note that this uses a `sin` approximation. |
| 1124 | * Added `angle_between` method for `Vec2` and `Vec3`. |
| 1125 | * Implemented `Debug`, `Display`, `PartialEq`, `Eq`, `PartialOrd`, `Ord`, |
| 1126 | `Hash`, and `AsRef` traits for `Vec2Mask`, `Vec3Mask` and `Vec4Mask`. |
| 1127 | * Added conversion functions from `Vec2Mask`, `Vec3Mask` and `Vec4Mask` to an |
| 1128 | array of `[u32]`. |
| 1129 | * Added `build.rs` to simplify conditional feature compilation. |
| 1130 | |
| 1131 | ### Changed |
| 1132 | |
| 1133 | * Increased test coverage. |
| 1134 | |
| 1135 | ### Removed |
| 1136 | |
| 1137 | * Removed `cfg-if` dependency. |
| 1138 | |
| 1139 | ## [0.8.6] - 2020-02-18 |
| 1140 | |
| 1141 | ### Added |
| 1142 | |
| 1143 | * Added the `packed-vec3` feature flag to disable using SIMD types for `Vec3` |
| 1144 | and `Mat3` types. This avoids wasting some space due to 16 byte alignment at |
| 1145 | the cost of some performance. |
| 1146 | * Added `x_mut`, `y_mut`, `z_mut`, `w_mut` where appropriate to `Vec2`, `Vec3` |
| 1147 | and `Vec4`. |
| 1148 | * Added implementation of `core::ops::Index` and `core::ops::IndexMut` for |
| 1149 | `Vec2`, `Vec3` and `Vec4`. |
| 1150 | |
| 1151 | ### Changed |
| 1152 | |
| 1153 | * Merged SSE2 and scalar `Vec3` and `Vec4` implementations into single files |
| 1154 | using the `cfg-if` crate. |
| 1155 | |
| 1156 | ## [0.8.5] - 2020-01-02 |
| 1157 | |
| 1158 | ### Added |
| 1159 | |
| 1160 | * Added projection functions `Mat4::perspective_lh`, |
| 1161 | `Mat4::perspective_infinite_lh`, `Mat4::perspective_infinite_reverse_lh`, |
| 1162 | `Mat4::orthgraphic_lh` and `Mat4::orthographic_rh`. |
| 1163 | * Added `round`, `ceil` and `floor` methods to `Vec2`, `Vec3` and `Vec4`. |
| 1164 | |
| 1165 | ## [0.8.4] - 2019-12-17 |
| 1166 | |
| 1167 | ### Added |
| 1168 | |
| 1169 | * Added `Mat4::to_scale_rotation_translation` for extracting scale, rotation and |
| 1170 | translation from a 4x4 homogeneous transformation matrix. |
| 1171 | * Added `cargo-deny` GitHub Action. |
| 1172 | |
| 1173 | ### Changed |
| 1174 | |
| 1175 | * Renamed `Quat::new` to `Quat::from_xyzw`. |
| 1176 | |
| 1177 | ## [0.8.3] - 2019-11-27 |
| 1178 | |
| 1179 | ### Added |
| 1180 | |
| 1181 | * Added `Mat4::orthographic_rh_gl`. |
| 1182 | |
| 1183 | ### Changed |
| 1184 | |
| 1185 | * Renamed `Mat4::perspective_glu_rh` to `Mat4::perspective_rh_gl`. |
| 1186 | * SSE2 optimizations for `Mat2::determinant`, `Mat2::inverse`, |
| 1187 | `Mat2::transpose`, `Mat3::transpose`, `Quat::conjugate`, `Quat::lerp`, |
| 1188 | `Quat::mul_vec3`, `Quat::mul_quat` and `Quat::from_rotation_ypr`. |
| 1189 | * Disabled optimizations to `Mat4::transform_point3` and |
| 1190 | `Mat4::transform_vector3` as they are probably incorrect and need |
| 1191 | investigating. |
| 1192 | * Added missing `#[repr(C)]` to `Mat2`, `Mat3` and `Mat4`. |
| 1193 | * Benchmarks now store output of functions to better estimate the cost of a |
| 1194 | function call. |
| 1195 | |
| 1196 | ### Removed |
| 1197 | |
| 1198 | * Removed deprecated functions `Mat2::new`, `Mat3::new` and `Mat4::new`. |
| 1199 | |
| 1200 | ## [0.8.2] - 2019-11-06 |
| 1201 | |
| 1202 | ### Changed |
| 1203 | |
| 1204 | * `glam_assert!` is no longer enabled by default in debug builds, it can be |
| 1205 | enabled in any configuration using the `glam-assert` feature or in debug |
| 1206 | builds only using the `debug-glam-assert` feature. |
| 1207 | |
| 1208 | ### Removed |
| 1209 | |
| 1210 | * `glam_assert!`'s checking `lerp` is bounded between 0.0 and 1.0 and that |
| 1211 | matrix scales are non-zero have been removed. |
| 1212 | |
| 1213 | ## [0.8.1] - 2019-11-03 |
| 1214 | |
| 1215 | ### Added |
| 1216 | |
| 1217 | * Added `Display` trait implementations for `Mat2`, `Mat3` and `Mat4`. |
| 1218 | |
| 1219 | ### Changed |
| 1220 | |
| 1221 | * Disabled `glam`'s SSE2 `sin_cos` implementation - it became less precise for |
| 1222 | large angle values. |
| 1223 | * Reduced the default epsilon used by the `is_normalized!` macro from |
| 1224 | `std::f32::EPSILON` to `1e-6`. |
| 1225 | |
| 1226 | ## [0.8.0] - 2019-10-14 |
| 1227 | |
| 1228 | ### Removed |
| 1229 | |
| 1230 | * Removed the `approx` crate dependency. Each `glam` type has an `abs_diff_eq` |
| 1231 | method added which is used by unit tests for approximate floating point |
| 1232 | comparisons. |
| 1233 | * Removed the `Angle` type. All angles are now `f32` and are expected to |
| 1234 | be in radians. |
| 1235 | * Removed the deprecated `Vec2b`, `Vec3b` and `Vec4b` types and the `mask` |
| 1236 | methods on `Vec2Mask`, `Vec3Mask` and `Vec4Mask`. |
| 1237 | |
| 1238 | ### Changed |
| 1239 | |
| 1240 | * The `rand` crate dependency has been removed from default features. This was |
| 1241 | required for benchmarking but a simple random number generator has been added |
| 1242 | to the benches `support` module instead. |
| 1243 | * The `From` trait implementation converting between 1D and 2D `f32` arrays and |
| 1244 | matrix types have been removed. It was ambiguous how array data would map to |
| 1245 | matrix columns so these have been replaced with explicit methods |
| 1246 | `from_cols_array` and `from_cols_array_2d`. |
| 1247 | * Matrix `new` methods have been renamed to `from_cols` to be consistent with |
| 1248 | the other methods that create matrices from data. |
| 1249 | * Renamed `Mat4::perspective_glu` to `Mat4::perspective_glu_rh`. |
| 1250 | |
| 1251 | ## [0.7.2] - 2019-09-22 |
| 1252 | |
| 1253 | ### Fixed |
| 1254 | |
| 1255 | * Fixed incorrect projection matrix methods `Mat4::look_at_lh` |
| 1256 | and `Mat4::look_at_rh`. |
| 1257 | |
| 1258 | ### Added |
| 1259 | |
| 1260 | * Added support for building infinite projection matrices, including both |
| 1261 | standard and reverse depth `Mat4::perspective_infinite_rh` and |
| 1262 | `Mat4::perspective_infinite_rh`. |
| 1263 | * Added `Vec2Mask::new`, `Vec3Mask::new` and `Vec4Mask::new` methods. |
| 1264 | * Implemented `std::ops` `BitAnd`, `BitAndAssign`, `BitOr`, `BitOrAssign` |
| 1265 | and `Not` traits for `Vec2Mask`, `Vec3Mask` and `Vec4Mask`. |
| 1266 | * Added method documentation for `Vec4` and `Vec4Mask` types. |
| 1267 | * Added missing `serde` implementations for `Mat2`, `Mat3` and `Mat4`. |
| 1268 | * Updated `rand` and `criterion` versions. |
| 1269 | |
| 1270 | ## [0.7.1] - 2019-07-08 |
| 1271 | |
| 1272 | ### Fixed |
| 1273 | |
| 1274 | * The SSE2 implementation of `Vec4` `dot` was missing a shuffle, meaning the |
| 1275 | `dot`, `length`, `length_squared`, `length_reciprocal` and `normalize` |
| 1276 | methods were sometimes incorrect. |
| 1277 | |
| 1278 | ### Added |
| 1279 | |
| 1280 | * Added the `glam_assert` macro which behaves like Rust's `debug_assert` but |
| 1281 | can be enabled separately to `debug_assert`. This is used to perform |
| 1282 | asserts on correctness. |
| 1283 | * Added `is_normalized` method to `Vec2`, `Vec3` and `Vec4`. |
| 1284 | |
| 1285 | ### Changed |
| 1286 | |
| 1287 | * Replaced usage of `std::mem::uninitialized` with `std::mem::MaybeUninit`. This |
| 1288 | change requires stable Rust 1.36. |
| 1289 | * Renamed `Vec2b` to `Vec2Mask`, `Vec3b` to `Vec3Mask` and `Vec4b` to |
| 1290 | `Vec4Mask`. Old names are aliased to the new name and deprecated. |
| 1291 | * Deprecate `VecNMask` `mask` method, use new `bitmask` method instead |
| 1292 | * Made fallback version of `VecNMask` types the same size and alignment as the |
| 1293 | SIMD versions. |
| 1294 | * Added `Default` support to `VecNMask` types, will add more common traits in |
| 1295 | the future. |
| 1296 | * Added `#[inline]` to `mat2`, `mat3` and `mat4` functions. |
| 1297 | |
| 1298 | ## [0.7.0] - 2019-06-28 |
| 1299 | |
| 1300 | ### Added |
| 1301 | |
| 1302 | * Added `Mat2` into `[f32; 4]`, `Mat3` into `[f32; 9]` and `Mat4` into |
| 1303 | `[f32; 16]`. |
| 1304 | |
| 1305 | ### Removed |
| 1306 | |
| 1307 | * Removed `impl Mul<&Vec2> for Mat2` and `impl Mul<&Vec3> for Vec3` as these |
| 1308 | don't exist for any other types. |
| 1309 | |
| 1310 | ## [0.6.1] - 2019-06-22 |
| 1311 | |
| 1312 | ### Changed |
| 1313 | |
| 1314 | * `Mat2` now uses a `Vec4` internally which gives it some performance |
| 1315 | improvements when SSE2 is available. |
| 1316 | |
| 1317 | ## 0.6.0 - 2019-06-13 |
| 1318 | |
| 1319 | ### Changed |
| 1320 | |
| 1321 | * Switched from row vectors to column vectors |
| 1322 | * Vectors are now on the right of multiplications with matrices and quaternions. |
| 1323 | |
| 1324 | [Keep a Changelog]: https://keepachangelog.com/ |
| 1325 | [Semantic Versioning]: https://semver.org/spec/v2.0.0.html |
| 1326 | [Unreleased]: https://github.com/bitshifter/glam-rs/compare/0.30.10...HEAD |
| 1327 | [0.30.9]: https://github.com/bitshifter/glam-rs/compare/0.30.9...0.30.10 |
| 1328 | [0.30.9]: https://github.com/bitshifter/glam-rs/compare/0.30.8...0.30.9 |
| 1329 | [0.30.8]: https://github.com/bitshifter/glam-rs/compare/0.30.7...0.30.8 |
| 1330 | [0.30.7]: https://github.com/bitshifter/glam-rs/compare/0.30.6...0.30.7 |
| 1331 | [0.30.6]: https://github.com/bitshifter/glam-rs/compare/0.30.5...0.30.6 |
| 1332 | [0.30.5]: https://github.com/bitshifter/glam-rs/compare/0.30.4...0.30.5 |
| 1333 | [0.30.4]: https://github.com/bitshifter/glam-rs/compare/0.30.3...0.30.4 |
| 1334 | [0.30.3]: https://github.com/bitshifter/glam-rs/compare/0.30.2...0.30.3 |
| 1335 | [0.30.2]: https://github.com/bitshifter/glam-rs/compare/0.30.1...0.30.2 |
| 1336 | [0.30.1]: https://github.com/bitshifter/glam-rs/compare/0.30.0...0.30.1 |
| 1337 | [0.30.0]: https://github.com/bitshifter/glam-rs/compare/0.29.2...0.30.0 |
| 1338 | [0.29.2]: https://github.com/bitshifter/glam-rs/compare/0.29.1...0.29.2 |
| 1339 | [0.29.1]: https://github.com/bitshifter/glam-rs/compare/0.29.0...0.29.1 |
| 1340 | [0.29.0]: https://github.com/bitshifter/glam-rs/compare/0.28.0...0.29.0 |
| 1341 | [0.28.0]: https://github.com/bitshifter/glam-rs/compare/0.27.0...0.28.0 |
| 1342 | [0.27.0]: https://github.com/bitshifter/glam-rs/compare/0.26.0...0.27.0 |
| 1343 | [0.26.0]: https://github.com/bitshifter/glam-rs/compare/0.25.0...0.26.0 |
| 1344 | [0.25.0]: https://github.com/bitshifter/glam-rs/compare/0.24.2...0.25.0 |
| 1345 | [0.24.2]: https://github.com/bitshifter/glam-rs/compare/0.24.1...0.24.2 |
| 1346 | [0.24.1]: https://github.com/bitshifter/glam-rs/compare/0.24.0...0.24.1 |
| 1347 | [0.24.0]: https://github.com/bitshifter/glam-rs/compare/0.23.0...0.24.0 |
| 1348 | [0.23.0]: https://github.com/bitshifter/glam-rs/compare/0.22.0...0.23.0 |
| 1349 | [0.22.0]: https://github.com/bitshifter/glam-rs/compare/0.21.3...0.22.0 |
| 1350 | [0.21.3]: https://github.com/bitshifter/glam-rs/compare/0.21.2...0.21.3 |
| 1351 | [0.21.2]: https://github.com/bitshifter/glam-rs/compare/0.21.1...0.21.2 |
| 1352 | [0.21.1]: https://github.com/bitshifter/glam-rs/compare/0.21.0...0.21.1 |
| 1353 | [0.21.0]: https://github.com/bitshifter/glam-rs/compare/0.20.5...0.21.0 |
| 1354 | [0.20.5]: https://github.com/bitshifter/glam-rs/compare/0.20.4...0.20.5 |
| 1355 | [0.20.4]: https://github.com/bitshifter/glam-rs/compare/0.20.3...0.20.4 |
| 1356 | [0.20.3]: https://github.com/bitshifter/glam-rs/compare/0.20.2...0.20.3 |
| 1357 | [0.20.2]: https://github.com/bitshifter/glam-rs/compare/0.20.1...0.20.2 |
| 1358 | [0.20.1]: https://github.com/bitshifter/glam-rs/compare/0.20.0...0.20.1 |
| 1359 | [0.20.0]: https://github.com/bitshifter/glam-rs/compare/0.19.0...0.20.0 |
| 1360 | [0.19.0]: https://github.com/bitshifter/glam-rs/compare/0.18.0...0.19.0 |
| 1361 | [0.18.0]: https://github.com/bitshifter/glam-rs/compare/0.17.3...0.18.0 |
| 1362 | [0.17.3]: https://github.com/bitshifter/glam-rs/compare/0.17.2...0.17.3 |
| 1363 | [0.17.2]: https://github.com/bitshifter/glam-rs/compare/0.17.1...0.17.2 |
| 1364 | [0.17.1]: https://github.com/bitshifter/glam-rs/compare/0.17.0...0.17.1 |
| 1365 | [0.17.0]: https://github.com/bitshifter/glam-rs/compare/0.16.0...0.17.0 |
| 1366 | [0.16.0]: https://github.com/bitshifter/glam-rs/compare/0.15.2...0.16.0 |
| 1367 | [0.15.2]: https://github.com/bitshifter/glam-rs/compare/0.15.1...0.15.2 |
| 1368 | [0.15.1]: https://github.com/bitshifter/glam-rs/compare/0.15.0...0.15.1 |
| 1369 | [0.15.0]: https://github.com/bitshifter/glam-rs/compare/0.14.0...0.15.0 |
| 1370 | [0.14.0]: https://github.com/bitshifter/glam-rs/compare/0.13.1...0.14.0 |
| 1371 | [0.13.1]: https://github.com/bitshifter/glam-rs/compare/0.13.0...0.13.1 |
| 1372 | [0.13.0]: https://github.com/bitshifter/glam-rs/compare/0.12.0...0.13.0 |
| 1373 | [0.12.0]: https://github.com/bitshifter/glam-rs/compare/0.11.3...0.12.0 |
| 1374 | [0.11.3]: https://github.com/bitshifter/glam-rs/compare/0.11.2...0.11.3 |
| 1375 | [0.11.2]: https://github.com/bitshifter/glam-rs/compare/0.11.1...0.11.2 |
| 1376 | [0.11.1]: https://github.com/bitshifter/glam-rs/compare/0.11.0...0.11.1 |
| 1377 | [0.11.0]: https://github.com/bitshifter/glam-rs/compare/0.10.2...0.11.0 |
| 1378 | [0.10.2]: https://github.com/bitshifter/glam-rs/compare/0.10.1...0.10.2 |
| 1379 | [0.10.1]: https://github.com/bitshifter/glam-rs/compare/0.10.0...0.10.1 |
| 1380 | [0.10.0]: https://github.com/bitshifter/glam-rs/compare/0.9.5...0.10.0 |
| 1381 | [0.9.5]: https://github.com/bitshifter/glam-rs/compare/0.9.4...0.9.5 |
| 1382 | [0.9.4]: https://github.com/bitshifter/glam-rs/compare/0.9.3...0.9.4 |
| 1383 | [0.9.3]: https://github.com/bitshifter/glam-rs/compare/0.9.2...0.9.3 |
| 1384 | [0.9.2]: https://github.com/bitshifter/glam-rs/compare/0.9.1...0.9.2 |
| 1385 | [0.9.1]: https://github.com/bitshifter/glam-rs/compare/0.9.0...0.9.1 |
| 1386 | [0.9.0]: https://github.com/bitshifter/glam-rs/compare/0.8.7...0.9.0 |
| 1387 | [0.8.7]: https://github.com/bitshifter/glam-rs/compare/0.8.6...0.8.7 |
| 1388 | [0.8.6]: https://github.com/bitshifter/glam-rs/compare/0.8.5...0.8.6 |
| 1389 | [0.8.5]: https://github.com/bitshifter/glam-rs/compare/0.8.4...0.8.5 |
| 1390 | [0.8.4]: https://github.com/bitshifter/glam-rs/compare/0.8.3...0.8.4 |
| 1391 | [0.8.3]: https://github.com/bitshifter/glam-rs/compare/0.8.2...0.8.3 |
| 1392 | [0.8.2]: https://github.com/bitshifter/glam-rs/compare/0.8.1...0.8.2 |
| 1393 | [0.8.1]: https://github.com/bitshifter/glam-rs/compare/0.8.0...0.8.1 |
| 1394 | [0.8.0]: https://github.com/bitshifter/glam-rs/compare/0.7.2...0.8.0 |
| 1395 | [0.7.2]: https://github.com/bitshifter/glam-rs/compare/0.7.1...0.7.2 |
| 1396 | [0.7.1]: https://github.com/bitshifter/glam-rs/compare/0.7.0...0.7.1 |
| 1397 | [0.7.0]: https://github.com/bitshifter/glam-rs/compare/0.6.1...0.7.0 |
| 1398 | [0.6.1]: https://github.com/bitshifter/glam-rs/compare/0.6.0...0.6.1 |