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