Debian Codegraph @

debian/missing-sources/glam-0.23.0/CHANGELOG.md

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