Debian Codegraph @

debian/missing-sources/glam-0.14.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.14.0] - 2021-04-09
9
10 ### Breaking changes
11
12 * Minimum Supported Version of Rust bumped to 1.45.0 for the `spriv-std`
13 dependency.
14
15 ### Added
16
17 * Added `AXES[]` constants to all vector types. These are arrays containing the
18 unit vector for each axis.
19 * Added quaternion `from_scaled_axis` and `to_scaled_axis` methods.
20
21 ### Changed
22
23 * Updated dependency versions of `bytemuck` to 1.5, `rand` to 0.8,
24 `rand_xoshiro` to 0.6 and `spriv-std` to 0.4.0-alpha4.
25
26 ## [0.13.1] - 2021-03-24
27
28 ### Added
29
30 * Added vector `clamp()` functions.
31 * Added matrix column and row accessor methods, `col()` and `row()`.
32 * Added SPIR-V module and depenency on `spriv-std` for the SPIR-V target.
33 * Added matrix truncation from 4x4 to 3x3 and 3x3 to 2x2 via `From` impls.
34
35 ### Changed
36
37 * Documentation corrections and improvements.
38
39 ## [0.13.0] - 2021-03-04
40
41 ### Breaking Changes
42
43 * The behavior of the 4x4 matrix method `transform_point3()` was changed to not
44 perform the perspective divide. This is an optimization for use with affine
45 transforms where perspective correction is not required. The
46 `project_point3()` method was added for transforming points by perspective
47 projections.
48 * The 3x3 matrix `from_scale()` method was changed to
49 create a affine transform containing a 2-dimensional non-uniform scale to be
50 consistent with the 4x4 matrix version. The
51 `from_diagonal()` method can be used to create a 3x3 scale matrix.
52 * The 3x3 matrix methods `transform_point2_as_vec3a`,
53 `transform_vector2_as_vec3a` and `mul_vec3_as_vec3a` were unintentionally
54 `pub` and are no longer publicly accessible.
55
56 ### Added
57
58 * Added `Vec2::X`, `Vec4::W` etc constants as a shorter versions of `unit_x()`
59 and friends.
60 * Added `ONE` constants for vectors.
61 * Added `IDENTITY` constants for `Mat2`, `Mat3`, `Mat4` and `Quat`.
62 * Added `ZERO` constant for vectors and matrices.
63 * Added `clamp_length()`, `clamp_length_max()`, and `clamp_length_min` methods
64 for `f32` and `f64` vector types.
65 * Added `try_normalize()` and `normalize_or_zero()` for all real vector types.
66 * Added `from_diagonal()` methods to all matrix types for creating diagonal
67 matrices from a vector.
68 * Added `angle_between()`, `from_rotation_arc()` and
69 `from_rotation_arc_colinear()` to quaternion types.
70 * Added quaternion `inverse()` which assumes the quaternion is already
71 normalized and returns the conjugate.
72 * Added `from_translation()` and `from_angle()` methods to 3x3 matrix types.
73 * Added `project_point3()` method to 4x4 matrics types. This method is for
74 transforming 3D vectors by perspective projection transforms.
75 * Added `Eq` and `Hash` impls for integer vector types.
76
77 ### Changed
78
79 * Deprecated `::unit_x/y/z()`, `::zero()`, `::one()`, `::identity()` functions
80 in favor of constants.
81
82 ## [0.12.0] - 2021-01-15
83
84 ### Breaking Changes
85
86 * `Vec2Mask`, `Vec3Mask` and `Vec4Mask` have been replaced by `BVec2`, `BVec3`,
87 `BVec3A`, `BVec4` and `BVec4A`. These types are used by some vector methods
88 and are not typically referenced directly.
89
90 ### Added
91
92 * Added `f64` primitive type support
93 * vectors: `DVec2`, `DVec3` and `DVec4`
94 * square matrices: `DMat2`, `DMat3` and `DMat4`
95 * a quaternion type: `DQuat`
96 * Added `i32` primitive type support
97 * vectors: `IVec2`, `IVec3` and `IVec4`
98 * Added `u32` primitive type support
99 * vectors: `UVec2`, `UVec3` and `UVec4`
100 * Added `bool` primitive type support
101 * vectors: `BVec2`, `BVec3` and `BVec4`
102
103 ### Removed
104
105 * `build.rs` has been removed.
106
107 ## [0.11.3] - 2020-12-29
108
109 ### Changed
110
111 * Made `Vec3` `repr(simd)` for `spriv` targets.
112
113 ### Added
114
115 * Added `From<(Vec2, f32)>` for `Vec3` and `From<(Vec3, f32)` for `Vec4`.
116
117 ## [0.11.2] - 2020-12-04
118
119 ### Changed
120
121 * Compilation fixes for Rust 1.36.0.
122
123 ## [0.11.1] - 2020-12-03
124
125 ### Added
126
127 * Added support for the [Rust GPU](https://github.com/EmbarkStudios/rust-gpu)
128 SPIRV target architecture.
129
130 ## [0.11.0] - 2020-11-26
131
132 ### Added
133
134 * Added `is_finite` method to all types which returns `true` if, and only if,
135 all contained elements are finite.
136 * Added `exp` and `powf` methods for all vector types.
137
138 ### Changed
139
140 * The `is_nan` method now returns a `bool` to match the new `is_finite` method
141 and to be consistent with the same methods on the `f32` and `f64` primitive
142 types.
143 * Renamed `is_nan` which returns a vector mask to `is_nan_mask`.
144 * Don't use the `cfg` definitions added by `build.rs` for defining structs as
145 `rust-analyzer` is not aware of them.
146
147 ### Removed
148
149 * Removed deprecated accessor methods.
150
151 ## [0.10.2] - 2020-11-17
152
153 ### Changed
154
155 * Deprecated element accessor members `.x()`, `.x_mut()`, `.set_x()`, etc. on
156 vector and quaternion types.
157 * Deprecated column accessor members `.x_axis()`, `.x_axis_mut()`,
158 `.set_x_axis()`, etc. on matrix types.
159
160 ## [0.10.1] - 2020-11-15
161
162 ### Added
163
164 * Added the `Vec2::perp` method which returns a `Vec2` perpendicular to `self`.
165
166 ### Changed
167
168 * `Vec2` and `Vec3` types were changed to use public named fields for `.x`,
169 `.y`, and `.z` instead of accessors.
170 * `Quat`, `Vec3A` and `Vec4` implement `Deref` and `DerefMut` for the new `XYZ`
171 and `XYZW` structs to emulate public named field access.
172 * `Mat3` and `Mat4` had their axis members made pubic instead of needing
173 accessors.
174 * `Mat2` implements `Deref` and `DerefMut` for the new `XYAxes` struct to
175 emulate public named field access.
176
177 ### Removed
178
179 * Removed deprecated `length_reciprocal` and `sign` methods.
180
181 ### Fixed
182
183 * Adding `glam` as a `no_std` dependency should now work as expected.
184
185 ## [0.10.0] - 2020-10-31
186
187 ### Breaking Changes
188
189 * Changed the return type of `Vec4::truncate` from `Vec3A` to `Vec3`.
190
191 ### Added
192
193 * Added `From` implementations to truncate to narrower vector types, e.g.
194 `Vec4` to `Vec3A`, `Vec3` and `Vec2` and from `Vec3A` and `Vec3` to `Vec2`.
195 * Added swizzles for `Vec4`, `Vec3A`, `Vec3` and `Vec2`. These can be used to
196 reorder elements in the same type and also to create larger or smaller
197 vectors from the given vectors elements.
198 * Added `Quat` operators `Add<Quat>`, `Sub<Quat>`, `Mul<f32>` and `Div<f32`.
199 These are used by other crates for interpolation quaternions along splines.
200 Note that these operations will not return unit length quaternions, thus the
201 results must be normalized before performing other `Quat` operations.
202 * Added `Mat4::transform_point3a` and `Mat4::transform_vector3a`.
203 * Added `AsRef<[f32; 9]>` and `AsMut<[f32; 9]>` trait implementations to `Mat3`.
204 * Added optional `bytemuck` support primarily for casting types to `&[u8]`.
205 * Added support for compiling with `no_std` by disabling the default `std`
206 feature and adding the `libm` feature.
207 * Added `distance` and `distance_squared` methods to `Vec2`, `Vec3`, `Vec3A`
208 and `Vec4`.
209
210 ## [0.9.5] - 2020-10-10
211
212 ### Added
213
214 * `glam` uses SSE2 for some types which prevents constructor functions can not
215 be made `const fn`. To work around this limitation the following macro
216 functions have been added to support creating `const` values of `glam` types:
217 `const_mat2`, `const_mat3`, `const_mat4`, `const_quat`, `const_vec2`,
218 `const_vec3`, `const_vec3a` and `const_vec4`.
219 * Added `is_nan` methods to `Vec2`, `Vec3`, `Vec3A` and `Vec4` which return a
220 mask.
221
222 ## Changed
223
224 * Renamed the vector `reciprocal` and `length_reciprocal` methods to `recip`
225 and `length_recip` to match the Rust standard library naming. The old methods
226 have been deprecated.
227 * Renamed the vector `sign` methods to `signum` match the Rust standard library
228 naming. The new methods now check for `NAN`. The old methods have been
229 deprecated.
230 * Added SSE2 optimized implementations of `Mat4::determinant` and
231 `Mat4::inverse`.
232
233 ### Removed
234
235 * Removed deprecated function `Mat4::perspective_glu_rh`.
236
237 ## [0.9.4] - 2020-08-31
238
239 ### Fixed
240
241 * Fixed `Mat4::transform_point3` to account for homogeneous w coordinate.
242 Previously this would have been incorrect when the resulting homogeneous
243 coordinate was not 1.0, e.g. when transforming by a perspective projection.
244 * Fixed `Mat3::transform_point2` to account for homogeneous z coordinate.
245
246 ## [0.9.3] - 2020-08-11
247
248 ### Added
249
250 * Added `Mat4::perspective_rh`.
251
252 ## [0.9.2] - 2020-07-09
253
254 ### Added
255
256 * Added `Mat3::mul_vec3a` and `Quat::mul_vec3a`.
257
258 ### Changed
259
260 * Changed `Quat::mul_vec3` to accept and return `Vec3` instead of `Vec3A`.
261
262 ## [0.9.1] - 2020-07-01
263
264 ### Added
265
266 * Added `Mat3 * Vec3A` implementation.
267 * Added `Vec3A` benches.
268
269 ### Changed
270
271 * Some documentation improvements around the new `Vec3A` type.
272
273 ## [0.9.0] - 2020-06-28
274
275 ### Added
276
277 * `Vec3` has been split into scalar `Vec3` and 16 byte aligned `Vec3A` types.
278 Only the `Vec3A` type currently uses SIMD optimizations.
279 * `Vec3Mask` has been split into scalar `Vec3Mask` and 16 byte aligned
280 `Vec3AMask` types.
281 * Added `mut` column accessors to all matrix types, e.g. `Mat2::x_axis_mut()`.
282 * Added `From` trait implementations for `Vec3AMask` and `Vec4Mask` to `__m128`.
283
284 ### Changed
285
286 * The `Mat3` type is using the scalar `Vec3` type for storage.
287 * Simplified `Debug` trait output for `Quat`, `Vec4` and `Vec3A`.
288
289 ## Removed
290
291 * Removed the `packed-vec3` feature flag as it is now redundant.
292
293 ## [0.8.7] - 2020-04-28
294
295 ### Added
296
297 * Added `Quat::slerp` - note that this uses a `sin` approximation.
298 * Added `angle_between` method for `Vec2` and `Vec3`.
299 * Implemented `Debug`, `Display`, `PartialEq`, `Eq`, `PartialOrd`, `Ord`,
300 `Hash`, and `AsRef` traits for `Vec2Mask`, `Vec3Mask` and `Vec4Mask`.
301 * Added conversion functions from `Vec2Mask`, `Vec3Mask` and `Vec4Mask` to an
302 array of `[u32]`.
303 * Added `build.rs` to simplify conditional feature compilation.
304
305 ### Changed
306
307 * Increased test coverage.
308
309 ### Removed
310
311 * Removed `cfg-if` dependency.
312
313 ## [0.8.6] - 2020-02-18
314
315 ### Added
316
317 * Added the `packed-vec3` feature flag to disable using SIMD types for `Vec3`
318 and `Mat3` types. This avoids wasting some space due to 16 byte alignment at
319 the cost of some performance.
320 * Added `x_mut`, `y_mut`, `z_mut`, `w_mut` where appropriate to `Vec2`, `Vec3`
321 and `Vec4`.
322 * Added implementation of `core::ops::Index` and `core::ops::IndexMut` for
323 `Vec2`, `Vec3` and `Vec4`.
324
325 ### Changed
326
327 * Merged SSE2 and scalar `Vec3` and `Vec4` implementations into single files
328 using the `cfg-if` crate.
329
330 ## [0.8.5] - 2020-01-02
331
332 ### Added
333
334 * Added projection functions `Mat4::perspective_lh`,
335 `Mat4::perspective_infinite_lh`, `Mat4::perspective_infinite_reverse_lh`,
336 `Mat4::orthgraphic_lh` and `Mat4::orthographic_rh`.
337 * Added `round`, `ceil` and `floor` methods to `Vec2`, `Vec3` and `Vec4`.
338
339 ## [0.8.4] - 2019-12-17
340
341 ### Added
342
343 * Added `Mat4::to_scale_rotation_translation` for extracting scale, rotation and
344 translation from a 4x4 homogeneous transformation matrix.
345 * Added `cargo-deny` GitHub Action.
346
347 ### Changed
348
349 * Renamed `Quat::new` to `Quat::from_xyzw`.
350
351 ## [0.8.3] - 2019-11-27
352
353 ### Added
354
355 * Added `Mat4::orthographic_rh_gl`.
356
357 ### Changed
358
359 * Renamed `Mat4::perspective_glu_rh` to `Mat4::perspective_rh_gl`.
360 * SSE2 optimizations for `Mat2::determinant`, `Mat2::inverse`,
361 `Mat2::transpose`, `Mat3::transpose`, `Quat::conjugate`, `Quat::lerp`,
362 `Quat::mul_vec3`, `Quat::mul_quat` and `Quat::from_rotation_ypr`.
363 * Disabled optimizations to `Mat4::transform_point3` and
364 `Mat4::transform_vector3` as they are probably incorrect and need
365 investigating.
366 * Added missing `#[repr(C)]` to `Mat2`, `Mat3` and `Mat4`.
367 * Benchmarks now store output of functions to better estimate the cost of a
368 function call.
369
370 ### Removed
371
372 * Removed deprecated functions `Mat2::new`, `Mat3::new` and `Mat4::new`.
373
374 ## [0.8.2] - 2019-11-06
375
376 ### Changed
377
378 * `glam_assert!` is no longer enabled by default in debug builds, it can be
379 enabled in any configuration using the `glam-assert` feature or in debug
380 builds only using the `debug-glam-assert` feature.
381
382 ### Removed
383
384 * `glam_assert!`'s checking `lerp` is bounded between 0.0 and 1.0 and that
385 matrix scales are non-zero have been removed.
386
387 ## [0.8.1] - 2019-11-03
388
389 ### Added
390
391 * Added `Display` trait implementations for `Mat2`, `Mat3` and `Mat4`.
392
393 ### Changed
394
395 * Disabled `glam`'s SSE2 `sin_cos` implementation - it became less precise for
396 large angle values.
397 * Reduced the default epsilon used by the `is_normalized!` macro from
398 `std::f32::EPSILON` to `1e-6`.
399
400 ## [0.8.0] - 2019-10-14
401
402 ### Removed
403
404 * Removed the `approx` crate dependency. Each `glam` type has an `abs_diff_eq`
405 method added which is used by unit tests for approximate floating point
406 comparisons.
407 * Removed the `Angle` type. All angles are now `f32` and are expected to
408 be in radians.
409 * Removed the deprecated `Vec2b`, `Vec3b` and `Vec4b` types and the `mask`
410 methods on `Vec2Mask`, `Vec3Mask` and `Vec4Mask`.
411
412 ### Changed
413
414 * The `rand` crate dependency has been removed from default features. This was
415 required for benchmarking but a simple random number generator has been added
416 to the benches `support` module instead.
417 * The `From` trait implementation converting between 1D and 2D `f32` arrays and
418 matrix types have been removed. It was ambiguous how array data would map to
419 matrix columns so these have been replaced with explicit methods
420 `from_cols_array` and `from_cols_array_2d`.
421 * Matrix `new` methods have been renamed to `from_cols` to be consistent with
422 the other methods that create matrices from data.
423 * Renamed `Mat4::perspective_glu` to `Mat4::perspective_glu_rh`.
424
425 ## [0.7.2] - 2019-09-22
426
427 ### Fixed
428
429 * Fixed incorrect projection matrix methods `Mat4::look_at_lh`
430 and `Mat4::look_at_rh`.
431
432 ### Added
433
434 * Added support for building infinite projection matrices, including both
435 standard and reverse depth `Mat4::perspective_infinite_rh` and
436 `Mat4::perspective_infinite_rh`.
437 * Added `Vec2Mask::new`, `Vec3Mask::new` and `Vec4Mask::new` methods.
438 * Implemented `std::ops` `BitAnd`, `BitAndAssign`, `BitOr`, `BitOrAssign`
439 and `Not` traits for `Vec2Mask`, `Vec3Mask` and `Vec4Mask`.
440 * Added method documentation for `Vec4` and `Vec4Mask` types.
441 * Added missing `serde` implementations for `Mat2`, `Mat3` and `Mat4`.
442 * Updated `rand` and `criterion` versions.
443
444 ## [0.7.1] - 2019-07-08
445
446 ### Fixed
447
448 * The SSE2 implementation of `Vec4` `dot` was missing a shuffle, meaning the
449 `dot`, `length`, `length_squared`, `length_reciprocal` and `normalize`
450 methods were sometimes incorrect.
451
452 ### Added
453
454 * Added the `glam_assert` macro which behaves like Rust's `debug_assert` but
455 can be enabled separately to `debug_assert`. This is used to perform
456 asserts on correctness.
457 * Added `is_normalized` method to `Vec2`, `Vec3` and `Vec4`.
458
459 ### Changed
460
461 * Replaced usage of `std::mem::uninitialized` with `std::mem::MaybeUninit`. This
462 change requires stable Rust 1.36.
463 * Renamed `Vec2b` to `Vec2Mask`, `Vec3b` to `Vec3Mask` and `Vec4b` to
464 `Vec4Mask`. Old names are aliased to the new name and deprecated.
465 * Deprecate `VecNMask` `mask` method, use new `bitmask` method instead
466 * Made fallback version of `VecNMask` types the same size and alignment as the
467 SIMD versions.
468 * Added `Default` support to `VecNMask` types, will add more common traits in
469 the future.
470 * Added `#[inline]` to `mat2`, `mat3` and `mat4` functions.
471
472 ## [0.7.0] - 2019-06-28
473
474 ### Added
475
476 * Added `Mat2` into `[f32; 4]`, `Mat3` into `[f32; 9]` and `Mat4` into
477 `[f32; 16]`.
478
479 ### Removed
480
481 * Removed `impl Mul<&Vec2> for Mat2` and `impl Mul<&Vec3> for Vec3` as these
482 don't exist for any other types.
483
484 ## [0.6.1] - 2019-06-22
485
486 ### Changed
487
488 * `Mat2` now uses a `Vec4` internally which gives it some performance
489 improvements when SSE2 is available.
490
491 ## 0.6.0 - 2019-06-13
492
493 ### Changed
494
495 * Switched from row vectors to column vectors
496 * Vectors are now on the right of multiplications with matrices and quaternions.
497
498 [Keep a Changelog]: https://keepachangelog.com/
499 [Semantic Versioning]: https://semver.org/spec/v2.0.0.html
500 [Unreleased]: https://github.com/bitshifter/glam-rs/compare/0.13.1...HEAD
501 [0.13.1]: https://github.com/bitshifter/glam-rs/compare/0.13.0...0.13.1
502 [0.13.0]: https://github.com/bitshifter/glam-rs/compare/0.12.0...0.13.0
503 [0.12.0]: https://github.com/bitshifter/glam-rs/compare/0.11.3...0.12.0
504 [0.11.3]: https://github.com/bitshifter/glam-rs/compare/0.11.2...0.11.3
505 [0.11.2]: https://github.com/bitshifter/glam-rs/compare/0.11.1...0.11.2
506 [0.11.1]: https://github.com/bitshifter/glam-rs/compare/0.11.0...0.11.1
507 [0.11.0]: https://github.com/bitshifter/glam-rs/compare/0.10.2...0.11.0
508 [0.10.2]: https://github.com/bitshifter/glam-rs/compare/0.10.1...0.10.2
509 [0.10.1]: https://github.com/bitshifter/glam-rs/compare/0.10.0...0.10.1
510 [0.10.0]: https://github.com/bitshifter/glam-rs/compare/0.9.5...0.10.0
511 [0.9.5]: https://github.com/bitshifter/glam-rs/compare/0.9.4...0.9.5
512 [0.9.4]: https://github.com/bitshifter/glam-rs/compare/0.9.3...0.9.4
513 [0.9.3]: https://github.com/bitshifter/glam-rs/compare/0.9.2...0.9.3
514 [0.9.2]: https://github.com/bitshifter/glam-rs/compare/0.9.1...0.9.2
515 [0.9.1]: https://github.com/bitshifter/glam-rs/compare/0.9.0...0.9.1
516 [0.9.0]: https://github.com/bitshifter/glam-rs/compare/0.8.7...0.9.0
517 [0.8.7]: https://github.com/bitshifter/glam-rs/compare/0.8.6...0.8.7
518 [0.8.6]: https://github.com/bitshifter/glam-rs/compare/0.8.5...0.8.6
519 [0.8.5]: https://github.com/bitshifter/glam-rs/compare/0.8.4...0.8.5
520 [0.8.4]: https://github.com/bitshifter/glam-rs/compare/0.8.3...0.8.4
521 [0.8.3]: https://github.com/bitshifter/glam-rs/compare/0.8.2...0.8.3
522 [0.8.2]: https://github.com/bitshifter/glam-rs/compare/0.8.1...0.8.2
523 [0.8.1]: https://github.com/bitshifter/glam-rs/compare/0.8.0...0.8.1
524 [0.8.0]: https://github.com/bitshifter/glam-rs/compare/0.7.2...0.8.0
525 [0.7.2]: https://github.com/bitshifter/glam-rs/compare/0.7.1...0.7.2
526 [0.7.1]: https://github.com/bitshifter/glam-rs/compare/0.7.0...0.7.1
527 [0.7.0]: https://github.com/bitshifter/glam-rs/compare/0.6.1...0.7.0
528 [0.6.1]: https://github.com/bitshifter/glam-rs/compare/0.6.0...0.6.1