Debian Codegraph @

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