Debian Codegraph @

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