Debian Codegraph @

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