| 1 | # Change Log |
| 2 | |
| 3 | All notable changes to `nalgebra`, starting with the version 0.6.0 will be |
| 4 | documented here. |
| 5 | |
| 6 | This project adheres to [Semantic Versioning](https://semver.org/). |
| 7 | |
| 8 | ## [0.34.1] (20 Sept. 2025) |
| 9 | |
| 10 | ### Added |
| 11 | |
| 12 | * Added `encase` feature, providing `encase` trait implementations for `nalgebra` types. |
| 13 | |
| 14 | ## [0.34.0] (31 July 2025) |
| 15 | |
| 16 | ### Added |
| 17 | |
| 18 | - Add the `convert-glam030` feature to enable conversion from/to types from `glam` v0.30. |
| 19 | - Add the `defmt` cargo feature that enables derives of `defmt::Format` for all no-std types. |
| 20 | |
| 21 | ### Changed |
| 22 | |
| 23 | - Bumped MSRV to 1.87.0. |
| 24 | - Updated rand dependency to 0.9.0. |
| 25 | - Renamed associated const `DimName::USIZE` to `DimName::DIM`. |
| 26 | - Moved to Rust 2024 edition. |
| 27 | - Several methods are now `const` whenever possible. See details in [#1522](https://github.com/dimforge/nalgebra/pull/1522). |
| 28 | - Features for conversion from/to types from `glam` (such as `convert-glam029`) no longer enable default features for |
| 29 | `glam`, allowing use in `no_std` environments. |
| 30 | |
| 31 | ### Fixed |
| 32 | |
| 33 | - Fix infinite loop when attempting to take the Schur decomposition of a 0 matrix. |
| 34 | |
| 35 | ## [0.33.2] (29 October 2024) |
| 36 | |
| 37 | ### Added |
| 38 | |
| 39 | - Add the `convert-glam029` feature to enable conversion from/to types from `glam` v0.29. |
| 40 | |
| 41 | ## [0.33.1] (16 October 2024) |
| 42 | |
| 43 | ### Added |
| 44 | |
| 45 | - Add implementations of `bytemuck` traits for isometries and similarities. |
| 46 | - Implement `AsRef<[T]>` for matrices with contiguous storage. |
| 47 | - Enable the `num-complex/bytemuck` feature when the `convert-bytemuck` feature is enabled. |
| 48 | |
| 49 | ## [0.33.0] (23 June 2024) |
| 50 | |
| 51 | ### Fixed |
| 52 | |
| 53 | - Fix a memory leak in `Matrix::generic_resize`. |
| 54 | - Fix `glm::is_null` to check the vector magnitude instead of individual components. |
| 55 | - Ensure that inverting a 4x4 matrix leaves it unchanged if the inversion fails. |
| 56 | |
| 57 | ### Added |
| 58 | |
| 59 | - Add the `glam-0.28` feature to enable conversion from/to types from `glam` v0.28. |
| 60 | - Add a `stack!` macro for concatenating matrices. See [#1375](https://github.com/dimforge/nalgebra/pull/1375). |
| 61 | |
| 62 | ### Modified |
| 63 | |
| 64 | - The `cuda` feature has been removed, as the toolchain it depends on is long abandoned. |
| 65 | - Update to `simba` 0.9. See the [changelog](https://github.com/dimforge/simba/blob/master/CHANGELOG) of `simba` for |
| 66 | details. |
| 67 | - Update the `nalgebra-macros` crate to `syn` 2.0. |
| 68 | - Remove the scalar type `T` from the `Allocator` trait parameters. Instead of `Allocator<T, R, C>`, use the simpler |
| 69 | `Allocator<R, C>`. |
| 70 | |
| 71 | ## [0.32.6] (12 June 2024) |
| 72 | |
| 73 | ### Added |
| 74 | |
| 75 | - Add the `glam-0.27` feature to enable conversion from/to types from `glam` v0.27. |
| 76 | |
| 77 | ## [0.32.5] (28 March 2024) |
| 78 | |
| 79 | ## Fixed |
| 80 | |
| 81 | - Fix numerical issue on SVD with near-identity matrix. |
| 82 | |
| 83 | ## [0.32.4] (19 Feb 2023) |
| 84 | |
| 85 | ### Added |
| 86 | |
| 87 | - Add the `glam-0.25` feature to enable conversion from/to types from `glam` v0.25. |
| 88 | |
| 89 | ## [0.32.3] (09 July 2023) |
| 90 | |
| 91 | ### Modified |
| 92 | |
| 93 | - Statically sized matrices are now serialized as tuples to match how serde |
| 94 | serialized plain arrays. |
| 95 | - Don’t require `Scalar` for matrix `PartialEq` and `Eq`. |
| 96 | |
| 97 | ### Added |
| 98 | |
| 99 | - Allow trailing punctuation in macros `vector!`, `matrix!`, `point!`, etc. |
| 100 | - Add the methods `Matrix1::as_scalar`, `::as_scalar_mut`, `::to_scalar`, `::into_scalar`. |
| 101 | - Add `Rotation3::euler_angles_ordered`, a generalized euler angles calculation. |
| 102 | - Add the `glam-0.24` feature to enable conversion from/to types from `glam` v0.24. |
| 103 | - Add the `glam-0.25` feature to enable conversion from/to types from `glam` v0.25. |
| 104 | - Add the `lerp` method to points. |
| 105 | - Implement `Clone` for `MatrixIter`. |
| 106 | |
| 107 | ### Fixed |
| 108 | |
| 109 | - Fixed severe catastrophic cancellation issue in variance calculation. |
| 110 | |
| 111 | ## [0.32.2] (07 March 2023) |
| 112 | |
| 113 | ### Added |
| 114 | |
| 115 | - Add the `glam-0.23` to enable conversion from/to type from `glam` v0.23. |
| 116 | |
| 117 | ## [0.32.1] (14 Jan. 2023) |
| 118 | |
| 119 | ### Modified |
| 120 | |
| 121 | - Updated `nalgebra-macros` to use the new `Dyn`, avoiding macro-generated deprecation warnings. |
| 122 | |
| 123 | ## [0.32.0] (14 Jan. 2023) |
| 124 | |
| 125 | ### Modified |
| 126 | |
| 127 | - Renamed all `MatrixSlice` types to `MatrixView`. In general all occurrences of the world `Slice` or `slice` have been |
| 128 | replaced by `View` or `view`. |
| 129 | - Deprecated all the types involving `Slice` in its name, in favor of the word `View`. |
| 130 | - Make it so that most `nalgebra` objects archive as themselves (when using `rkyv` for serialization). |
| 131 | - Renamed `Dynamic` to `Dyn` and make `Dyn` a tuple struct. |
| 132 | |
| 133 | ### Added |
| 134 | |
| 135 | - Add `Cholesky::ln_determinant` to compute the natural logarithm of the determinant of a matrix decomposed |
| 136 | with Cholesky. This can be more numerically stable than computing the determinant itself when very small and/or |
| 137 | large values are involved. |
| 138 | - Added new methods `Matrix::as_view` and `Matrix::as_view_mut`, which are very useful when working with view-based |
| 139 | APIs. |
| 140 | - Added parallel column iterator using `rayon`: `Matrix::par_column_iter` and `Matrix::par_column_iter_mut`. The `rayon` |
| 141 | feature must be enabled to access these methods. |
| 142 | - Implement `ReshapableStorage` for matrix slices (only for unit strides at the moment). |
| 143 | - Add `U0, U1, …` constants alongside the `U0, U1, …` types. This lets us write `U4` instead of `U4::name()` or |
| 144 | `Const::<4>` when we need const dimensions. |
| 145 | |
| 146 | ### Fixed |
| 147 | |
| 148 | - Fixed the implementation of `Rotation3::euler_angles` to return the angles in the documented order (roll, pitch, yaw). |
| 149 | |
| 150 | ## [0.31.4] (13 Nov. 2022) |
| 151 | |
| 152 | ### Added |
| 153 | |
| 154 | - Add a `convert-glam022` feature to enable conversion between `nalgebra` and `glam v0.22`. |
| 155 | |
| 156 | ## [0.31.3] (30 Oct. 2022) |
| 157 | |
| 158 | ### Added |
| 159 | |
| 160 | - Add `Matrix::try_cast` to attempt casting the inner scalar types when that cast may fail. |
| 161 | |
| 162 | ### Fixed |
| 163 | |
| 164 | - Fixed the usage of `CheckBytes` with `rkyv`. |
| 165 | |
| 166 | ## [0.31.2] (09 Oct. 2022) |
| 167 | |
| 168 | ### Modified |
| 169 | |
| 170 | - Use `#[inline]` on the `Dim` implementation for `Const` to improve opt-level 1 performance. |
| 171 | - Make the `Point::new` constructions const-fn. |
| 172 | |
| 173 | ### Added |
| 174 | |
| 175 | - Add `UnitVector::cast` to change the underlying scalar type. |
| 176 | |
| 177 | ## [0.31.1] (31 July 2022) |
| 178 | |
| 179 | ### Modified |
| 180 | |
| 181 | - Improve performances of multiplication of two sparse matrices. |
| 182 | |
| 183 | ### Added |
| 184 | |
| 185 | - Add `Matrix::from_row_iterator` to build a matrix from an iterator yielding components in row-major order. |
| 186 | - Add support for conversion from/to types of `glam` 0.21. |
| 187 | - `nalgebra-sparse`: add support for the matrix-market export of sparse matrices. |
| 188 | - `nalgebra-lapack`: add a `GE` for solving the generalized eigenvalues problem. |
| 189 | |
| 190 | ### Fixed |
| 191 | |
| 192 | - Fix `Rotation3::from_matrix` and `UnitQuaternion::from_matrix` when the input matrix is already a valid |
| 193 | rotation matrix. |
| 194 | |
| 195 | ## [0.31.0] (30 Apr. 2022) |
| 196 | |
| 197 | ### Breaking changes |
| 198 | |
| 199 | - Switch to `cust` 0.3 (for CUDA support). |
| 200 | - Switch to `rkyv` 0.7 |
| 201 | - Remove support for serialization based on `abomonation`. |
| 202 | - Remove support for conversions between `nalgebra` types and `glam` 0.13. |
| 203 | |
| 204 | ### Modified |
| 205 | |
| 206 | - The aliases for `Const` types have been simplified to help `rust-analyzer`. |
| 207 | |
| 208 | ### Added |
| 209 | |
| 210 | - Add `TryFrom` conversion between `UnitVector2/3/4` and `glam`’s `Vec2/3/4`. |
| 211 | - `nalgebra-sparse`: added support for serialization of sparse matrices with `serde`. |
| 212 | - `nalgebra-sparse`: add a CSC matrix constructor from unsorted (but valid) data. |
| 213 | - `nalgebra-lapack`: add generalized eigenvalues/eigenvectors calculation + QZ decomposition. |
| 214 | |
| 215 | ### Fixed |
| 216 | |
| 217 | - Improve stability of SVD. |
| 218 | - Fix slerp for `UnitComplex`. |
| 219 | |
| 220 | ## [0.30.1] (09 Jan. 2022) |
| 221 | |
| 222 | ### Added |
| 223 | |
| 224 | - Add conversion from/to types of `glam` 0.19 and 0.20. |
| 225 | |
| 226 | ## [0.30.0] (02 Jan. 2022) |
| 227 | |
| 228 | ### Breaking changes |
| 229 | |
| 230 | - The `Dim` trait is now marked as unsafe. |
| 231 | - The `Matrix::pow` and `Matrix::pow_mut` methods only allow positive integer exponents now. To compute negative |
| 232 | exponents, the user is free to invert the matrix before calling `pow` with the exponent’s absolute value. |
| 233 | - Remove the `Bounded` requirement from `RealField`. Replace it by methods returning `Option<Self>` so that they can |
| 234 | still be implemented by unbounded types (by returning `None`). |
| 235 | - The `ComplexField` trait derives from `FromPrimitive` again. We can actually keep this because all its methods |
| 236 | return `Option<Self>`, meaning that it could be implemented by any type. |
| 237 | |
| 238 | ### Modified |
| 239 | |
| 240 | - Use more concise debug impls for matrices and geometric transformation types. |
| 241 | - The singular values computed by the SVD are now sorted in increasing order by default. Use `SVD::new_unordered` |
| 242 | instead to reproduce the older behavior without the sorting overhead. |
| 243 | - The `UnitDualQuaternion::sclerp` method will no longer panic when given two equal rotations. |
| 244 | - The `Matrix::select_rows` and `Matrix::select_columns` methods no longer require the matrix components to implement |
| 245 | the trait `Zero`. |
| 246 | - The `Matrix::pow` and `Matrix::pow_mut` methods will now also work with integer matrices. |
| 247 | |
| 248 | ### Added |
| 249 | |
| 250 | - Added the conversion trait `From<Vec<T>>` and method `from_vec_storage` for `RowDVector`. |
| 251 | - Added implementation of `From` and `Into` for converting between `nalgebra` types and types from |
| 252 | `glam 0.18`. These can be enabled by enabling the `convert-glam018` cargo features. |
| 253 | - Added the methods `Matrix::product`, `::row_product`, `::row_product_tr`, and `::column_product` to compute the |
| 254 | product of the components, rows, or columns, of a single matrix or vector. |
| 255 | - The `Default` trait is now implemented for most geometric types: `Point`, `Isometry`, `Rotation`, `Similarity`, |
| 256 | `Transform`, `UnitComplex`, and `UnitQuaternion`. |
| 257 | - Added the `Scale` geometric type for representing non-uniform scaling. |
| 258 | - Added `Cholesky::new_with_substitute` that will replace diagonal elements by a given constant whenever `Cholesky` |
| 259 | meets a non-definite-positiveness. |
| 260 | - Re-added the conversion from a vector/matrix slice to a static array. |
| 261 | - Added the `cuda` feature that enables the support of [rust-cuda](https://github.com/Rust-GPU/Rust-CUDA) for using |
| 262 | `nalgebra` features with CUDA kernels written in Rust. |
| 263 | - Added special-cases implementations for the 2x2 and 3x3 SVDs for better accuracy and performances. |
| 264 | - Added the methods `Matrix::polar`, `Matrix::try_polar`, and `SVD::to_polar` to compute the polar decomposition of |
| 265 | a matrix, based on its SVD. |
| 266 | - `nalgebra-sparse`: provide constructors for unsorted but otherwise valid data using the CSR format. |
| 267 | - `nalgebra-sparse`: added reading MatrixMarked data files to a sparse `CooMatrix`. |
| 268 | |
| 269 | ### Fixed |
| 270 | |
| 271 | - Fixed a potential unsoundness with `matrix.get(i)` and `matrix.get_mut(i)` where `i` is an `usize`, and `matrix` |
| 272 | is a matrix slice with non-default strides. |
| 273 | - Fixed potential unsoundness with `vector.perp` where `vector` isn’t actually a 2D vector as expected. |
| 274 | - Fixed linkage issue with `nalgebra-lapack`: the user of `nalgebra-lapack` no longer have to add |
| 275 | `extern crate lapack-src` to their `main.rs`. |
| 276 | - Fixed the `no-std` build of `nalgebra-glm`. |
| 277 | - Fix the `pow` and `pow_mut` functions (the result was incorrect for some exponent values). |
| 278 | |
| 279 | ## [0.29.0] |
| 280 | |
| 281 | ### Breaking changes |
| 282 | |
| 283 | - We updated to the version 0.6 of `simba`. This means that the trait bounds `T: na::RealField`, `na::ComplexField`, |
| 284 | `na::SimdRealField`, `na:SimdComplexField` no imply that `T: Copy` (they only imply that `T: Clone`). This may affect |
| 285 | generic code. |
| 286 | - The closure given to `apply`, `zip_apply`, `zip_zip_apply` must now modify the |
| 287 | first argument inplace, instead of returning a new value. This makes these |
| 288 | methods more versatile, and avoid useless clones when using non-Copy scalar |
| 289 | types. |
| 290 | - The `Allocator` trait signature has been significantly modified in order to handle uninitialized matrices in a sound |
| 291 | way. |
| 292 | |
| 293 | ### Modified |
| 294 | |
| 295 | - `Orthographic3::from_matrix_unchecked` is now `const fn`. |
| 296 | - `Perspective3::from_matrix_unchecked` is now `const fn`. |
| 297 | - `Rotation::from_matrix_unchecked` is now `const fn`. |
| 298 | - The `Scalar` is now automatically implemented for most `'static + Clone` types. Type that implement `Clone` but not |
| 299 | `Copy` are now much safer to work with thanks to the refactoring of the `Allocator` system. |
| 300 | |
| 301 | ### Added |
| 302 | |
| 303 | - The conversion traits form the `bytemuck` crates are now implemented for the geometric types too. |
| 304 | - Added operator overloading for `Transform * UnitComplex`, `UnitComplex * Transform`, `Transform ×= UnitComplex`, |
| 305 | `Transform ÷= UnitComplex`. |
| 306 | - Added `Reflection::bias()` to retrieve the bias of the reflection. |
| 307 | - Added `Reflection1..Reflection6` aliases for 1D to 6D reflections. |
| 308 | - Added implementation of `From` and `Into` for converting between `nalgebra` types and types from |
| 309 | `glam 0.16` and `glam 0.17`. These can be enabled by enabling the `convert-glam016`, and/or `convert-glam017` |
| 310 | cargo features. |
| 311 | |
| 312 | ## [0.28.0] |
| 313 | |
| 314 | ### Added |
| 315 | |
| 316 | - Implement `Hash` for `Transform`. |
| 317 | - Implement `Borrow` and `BorrowMut` for contiguous slices. |
| 318 | |
| 319 | ### Modified |
| 320 | |
| 321 | - The `OPoint<T, D>` type has been added. It takes the dimension number as a type-level integer (e.g. `Const<3>`) |
| 322 | instead |
| 323 | of a const-generic. The type `Point<T, const D: usize>` is now an alias for `OPoint`. This changes doesn't affect any |
| 324 | of the existing code using `Point`. However, it will allow the use `OPoint` in a generic context where the dimension |
| 325 | cannot be easily expressed as a const-generic (because of the current limitation of const-generics in Rust). |
| 326 | - Several clippy warnings were fixed. This results in some method signature changes (e.g. taking `self` instead |
| 327 | of `&self`) |
| 328 | but this should not have any practical infulances on existing codebase. |
| 329 | - The `Point::new` constructors are no longer const-fn. This is due to some limitations in const-fn |
| 330 | not allowing custom trait-bounds. Use the `point!` macro instead to build points in const environments. |
| 331 | - `Dynamic::new` and `Unit::new_unchecked` are now const-fn. |
| 332 | - Methods returning `Result<(), ()>` now return `bool` instead. |
| 333 | |
| 334 | ### Fixed |
| 335 | |
| 336 | - Fixed a potential unsoundess issue when converting a mutable slice to a `&mut[T]`. |
| 337 | |
| 338 | ## [0.27.1] |
| 339 | |
| 340 | ### Fixed |
| 341 | |
| 342 | - Fixed a bug in the conversion from `glam::Vec2` or `glam::DVec2` to `Isometry2`. |
| 343 | |
| 344 | ## [0.27.0] |
| 345 | |
| 346 | This removes the `convert-glam` and `convert-glam-unchecked` optional features. |
| 347 | Instead, this adds the `convert-glam013`, `convert-glam014`, and `convert-glam015` optional features for |
| 348 | conversions targeting the versions 0.13, 0.14, and 0.15 of `glam`. |
| 349 | |
| 350 | ### Added |
| 351 | |
| 352 | - Add macros `matrix!`, `dmatrix!`, `vector!`, `dvector!`, `point!` for constructing matrices/vectors/points in a |
| 353 | more convenient way. See [#886](https://github.com/dimforge/nalgebra/pull/886) |
| 354 | and [#899](https://github.com/dimforge/nalgebra/pull/899). |
| 355 | - Add `CooMatrix::reserve` to `nalgebra-sparse`. |
| 356 | - Add basic support for serialization using `rkyv`. Can be enabled with the features `rkyv-serialize` or |
| 357 | `rkyv-serialize-no-std`. |
| 358 | |
| 359 | ### Fixed |
| 360 | |
| 361 | - Fixed a potential unsoundness issue after deserializing an invalid `DVector` using `serde`. |
| 362 | |
| 363 | ## [0.26.2] |
| 364 | |
| 365 | ### Added |
| 366 | |
| 367 | - Conversion from an array `[T; D]` to an isometry `Isometry<T, _, D>` (as a translation). |
| 368 | - Conversion from a static vector `SVector<T; D>` to an isometry `Isometry<T, _, D>` (as a translation). |
| 369 | - Conversion from a point `Point<T; D>` to an isometry `Isometry<T, _, D>` (as a translation). |
| 370 | - Conversion of an array `[T; D]` from/to a translation `Translation<T, D>`. |
| 371 | - Conversion of a point `Point<T, D>` to a translation `Translation<T, D>`. |
| 372 | - Conversion of the tuple of glam types `(Vec3, Quat)` from/to an `Isometry2` or `Isometry3`. |
| 373 | - Conversion of a glam type `Vec2/3/4` from/to a `Translation2/3/4`. |
| 374 | |
| 375 | ## [0.26.1] |
| 376 | |
| 377 | Fix a regression introduced in 0.26.0 preventing `DVector` from being serialized with `serde`. |
| 378 | |
| 379 | ## [0.26.0] |
| 380 | |
| 381 | This release integrates `min-const-generics` to nalgebra. See |
| 382 | [our blog post](https://www.dimforge.com/blog/2021/04/12/integrating-const-generics-to-nalgebra) |
| 383 | for details about this release. |
| 384 | |
| 385 | ### Added |
| 386 | |
| 387 | - Add type aliases for unit vector, e.g., `UnitVector3`. |
| 388 | - Add a `pow` and `pow_mut` function to square matrices. |
| 389 | - Add `Cholesky::determinant` to compute the determinant of a matrix decomposed |
| 390 | with Cholesky. |
| 391 | - Add the `serde-serialize-no-std` feature to enable serialization of static matrices/vectors |
| 392 | with serde, but without requiring `std`. |
| 393 | |
| 394 | ### Modified |
| 395 | |
| 396 | - The `serde` crate isn't enabled by default now. Enable the `serde-serialize` or the |
| 397 | `serde-serialize-no-std` features instead. |
| 398 | - The `Const<const D: usize>` type has been introduced to represent dimensions known |
| 399 | at compile-time. This replaces the type-level integers from `typenum` as well as |
| 400 | the `U1, U2, ..., U127` types from `nalgebra`. These `U1, U2, ..., U127` are now |
| 401 | just aliases for `Const<D>`, e.g., `type U2 = Const<2>`. |
| 402 | - The `ArrayStorage` now uses a standard array `[[T; R]; C]` instead of a `GenericArray`. |
| 403 | - Many trait bounds were changed to accommodate const-generics. Most of these changes |
| 404 | should be transparent wrt. non-generic code. |
| 405 | - The `MatrixMN` alias has been deprecated. Use `OMatrix` or `SMatrix` instead. |
| 406 | - The `MatrixN<T, D>` alias has been deprecated. Use `OMatrix<T, D, D>` or `SMatrix` instead. |
| 407 | - The `VectorN<T, D>` alias has been deprecated. Use `OVector` or `SVector` instead. |
| 408 | - The `Point`, `Translation`, `Isometry`, `Similarity`, and `Transformation` types now take an |
| 409 | integer for their dimension (instead of a type-level integer). |
| 410 | - The type parameter order of `Isometry`, `Similarity`, `Transformation` changed to put |
| 411 | the integer dimensions in the last position (this is required by the compiler). |
| 412 | - The `::new` constructors of translations, points, matrices, and vectors of dimensions `<= 6` |
| 413 | are now `const fn`, making them usable to define constant globals. The `Quaternion::new` |
| 414 | constructor is also a `const fn` now. |
| 415 | |
| 416 | ## [0.25.4] |
| 417 | |
| 418 | ### Fixed |
| 419 | |
| 420 | - Fix a compilation error when only the `serde-serialize` feature is enabled. |
| 421 | |
| 422 | ## [0.25.3] |
| 423 | |
| 424 | ### Added |
| 425 | |
| 426 | - The `Vector::simd_cap_magnitude` method to cap the magnitude of the vector with |
| 427 | SIMD components. |
| 428 | |
| 429 | ## [0.25.2] |
| 430 | |
| 431 | ### Added |
| 432 | |
| 433 | - A `convert-glam` cargo feature to enable implementations of `From` traits to convert |
| 434 | between `glam` types and `nalgebra` types. |
| 435 | - A `convert-glam-unchecked` cargo feature to enable some extra `glam`/`nalgebra` conversions that may |
| 436 | lead to unexpected results if used improperly. For example, this enables the conversion from a |
| 437 | `glam::Mat4` to a `na::Isometry3`. This conversion will be cheap (without any check) but willlead to |
| 438 | unexpected results if the glam matrix contains non-isometric components (like scaling for example). |
| 439 | - A `cast` method has been added to most types. This can be used to change the |
| 440 | type of the components of a given entity. Example: `vector.cast::<f32>()`. |
| 441 | |
| 442 | ## [0.25.1] |
| 443 | |
| 444 | This release replaces the version 0.25.0 which has been yanked. The 0.25.0 version |
| 445 | added significant complication to build `nalgebra` targeting a `#[no-std]` platform |
| 446 | not supported by `rand`. |
| 447 | |
| 448 | The `rand` dependency is now optional (and disabled by default). You may enable it with: |
| 449 | |
| 450 | - The `rand-no-std` cargo feature when targeting a `#[no-std]` environment. |
| 451 | - The `rand` cargo feature when targeting a `std` environment. |
| 452 | |
| 453 | ## [0.25.0] - Yanked |
| 454 | |
| 455 | This updates all the dependencies of nalgebra to their latest version, including: |
| 456 | |
| 457 | - rand 0.8 |
| 458 | - proptest 1.0 |
| 459 | - simba 0.4 |
| 460 | |
| 461 | ### New crate: nalgebra-sparse |
| 462 | |
| 463 | Alongside this release of `nalgebra`, we are releasing `nalgebra-sparse`: a crate dedicated to sparse matrix |
| 464 | computation with `nalgebra`. The `sparse` module of `nalgebra`itself still exists for backward compatibility, |
| 465 | but it will be deprecated soon in favor of the `nalgebra-sparse` crate. |
| 466 | |
| 467 | ### Added |
| 468 | |
| 469 | * Add `UnitDualQuaternion`, a dual-quaternion with unit magnitude which can be used as an isometry transformation. |
| 470 | * Add `UDU::new()` and `matrix.udu()` to compute the UDU factorization of a matrix. |
| 471 | * Add `ColPivQR::new()` and `matrix.col_piv_qr()` to compute the QR decomposition with column pivoting of a matrix. |
| 472 | * Add `from_basis_unchecked` to all the rotation types. This builds a rotation from a set of basis vectors (representing |
| 473 | the columns of the corresponding rotation matrix). |
| 474 | * Add `Matrix::cap_magnitude` to cap the magnitude of a vector. |
| 475 | * Add `UnitQuaternion::append_axisangle_linearized` to approximately append a rotation represented as an axis-angle to a |
| 476 | rotation represented as an unit quaternion. |
| 477 | * Mark the iterators on matrix components as `DoubleEndedIter`. |
| 478 | * Re-export `simba::simd::SimdValue` at the root of the `nalgebra` crate. |
| 479 | |
| 480 | ## [0.24.0] |
| 481 | |
| 482 | ### Added |
| 483 | |
| 484 | * The `DualQuaternion` type. It is still work-in-progress, but the basics are here: |
| 485 | creation from its real and dual part, multiplication of two dual quaternions, |
| 486 | and normalization. |
| 487 | |
| 488 | ### Removed |
| 489 | |
| 490 | * There is no blanket `impl<T> PartialEq for Unit<T>` anymore. Instead, it is |
| 491 | implemented specifically for `UnitComplex`, `UnitQuaternion` and `Unit<Vector>`. |
| 492 | |
| 493 | ## [0.23.2] |
| 494 | |
| 495 | In this release, we improved the documentation of some of the geometric types |
| 496 | by applying changes similar to what we did in the version 0.23.1 for matrices. |
| 497 | |
| 498 | ### Added |
| 499 | |
| 500 | * The `Isometry::inv_mul` method which is a more efficient way of doing |
| 501 | `isometry1.inverse() * isometry2`. |
| 502 | |
| 503 | ## [0.23.1] |
| 504 | |
| 505 | In this release we improved the documentation of the matrix and vector types by: |
| 506 | |
| 507 | - Grouping `impl` bocks logically, adding a title comment to these impl blocks. |
| 508 | - Reference these impl blocks docs at the top of the documentation page for `Matrix`. |
| 509 | - Reduce the depth of type aliasing. Now all vector and matrix types are aliases of `Matrix` |
| 510 | directly (instead of being aliases for other aliases). |
| 511 | |
| 512 | ## [0.23.0] |
| 513 | |
| 514 | ### Added |
| 515 | |
| 516 | * The `.inverse_transform_unit_vector(v)` was added to `Rotation2/3`, `Isometry2/3`, `UnitQuaternion`, |
| 517 | and `UnitComplex`. |
| 518 | It applies the corresponding rotation to a unit vector `Unit<Vector2/3>`. |
| 519 | * The `Point.map(f)` and `Point.apply(f)` to apply a function to each component of the point, similarly |
| 520 | to `Vector.map(f)` |
| 521 | and `Vector.apply(f)`. |
| 522 | * The `Quaternion::from([N; 4])` conversion to build a quaternion from an array of four elements. |
| 523 | * The `Isometry::from(Translation)` conversion to build an isometry from a translation. |
| 524 | * The `Vector::ith_axis(i)` which build a unit vector, e.g., `Unit<Vector3<f32>>` with its i-th component set to 1.0, |
| 525 | and the |
| 526 | others set to zero. |
| 527 | * The `Isometry.lerp_slerp` and `Isometry.try_lerp_slerp` methods to interpolate between two isometries using linear |
| 528 | interpolation for the translational part, and spherical interpolation for the rotational part. |
| 529 | * The `Rotation2.slerp`, `Rotation3.slerp`, and `UnitQuaternion.slerp` method for |
| 530 | spherical interpolation. |
| 531 | |
| 532 | ## [0.22.0] |
| 533 | |
| 534 | In this release, we are using the new version 0.2 of simba. One major change of that version is that the |
| 535 | use of `libm` is now opt-in when building targeting `no-std` environment. If you are using floating-point |
| 536 | operations with nalgebra in a `no-std` environment, you will need to enable the new `libm` feature |
| 537 | of nalgebra for your code to compile again. |
| 538 | |
| 539 | ### Added |
| 540 | |
| 541 | * The `libm` feature that enables `libm` when building for `no-std` environment. |
| 542 | * The `libm-force` feature that enables `libm` even when building for a not `no-std` environment. |
| 543 | * `Cholesky::new_unchecked` which build a Cholesky decomposition without checking that its input is |
| 544 | positive-definite. It can be used with SIMD types. |
| 545 | * The `Default` trait is now implemented for matrices, and quaternions. They are all filled with zeros, |
| 546 | except for `UnitQuaternion` which is initialized with the identity. |
| 547 | * Matrix exponential `matrix.exp()`. |
| 548 | * The `Vector::ith(i, x)` that builds a vector filled with zeros except for the `i`-th component set to `x`. |
| 549 | |
| 550 | ## [0.21.0] |
| 551 | |
| 552 | In this release, we are no longer relying on traits from the __alga__ crate for our generic code. |
| 553 | Instead, we use traits from the new [simba](https://crates.io/crates/simba) crate which are both |
| 554 | simpler, and allow for significant optimizations like AoSoA SIMD. |
| 555 | |
| 556 | Refer to the [monthly dimforge blogpost](https://www.dimforge.org/blog/2020/04/01/this-month-in-dimforge/) |
| 557 | for details about this switch and its benefits. |
| 558 | |
| 559 | ### Added |
| 560 | |
| 561 | * It is now possible to use SIMD types like `simba::f32x4` as scalar types for nalgebra's matrices and |
| 562 | geometric types. |
| 563 | |
| 564 | ### Modified |
| 565 | |
| 566 | * Use of traits like `alga::general::{RealField, ComplexField}` have now been replaced by |
| 567 | `simba::scalar::{RealField, ComplexField}`. |
| 568 | * The implementation of traits from the __alga__ crate (and well as the dependency to _alga__) are now |
| 569 | omitted unless the `alga` cargo feature is activated. |
| 570 | |
| 571 | ### Removed |
| 572 | |
| 573 | * The `Neg` unary operator is no longer implemented for `UnitComplex` and `UnitQuaternion`. This caused |
| 574 | hard-to-track errors when we mistakenly write, e.g., `-q * v` instead of `-(q * v)`. |
| 575 | * The `na::convert_unchecked` is no longer marked as unsafe. |
| 576 | |
| 577 | ## [0.20.0] |
| 578 | |
| 579 | ### Added |
| 580 | |
| 581 | * `cholesky.rank_one_update(...)` which performs a rank-one update on the cholesky decomposition of a matrix. |
| 582 | * `From<&Matrix>` is now implemented for matrix slices. |
| 583 | * `.try_set_magnitude(...)` which sets the magnitude of a vector, while keeping its direction. |
| 584 | * Implementations of `From` and `Into` for the conversion between matrix slices and standard (`&[N]` `&mut [N]`) slices. |
| 585 | |
| 586 | ### Modified |
| 587 | |
| 588 | * We started some major changes in order to allow non-Copy types to be used as scalar types inside of matrices/vectors. |
| 589 | |
| 590 | ## [0.19.0] |
| 591 | |
| 592 | ### Added |
| 593 | |
| 594 | * `.remove_rows_at` and `remove_columns_at` which removes a set of rows or columns (specified by indices) from a matrix. |
| 595 | * Several formatting traits have been implemented for all matrices/vectors: `LowerExp`, `UpperExp`, `Octal`, `LowerHex`, |
| 596 | `UpperHex`, `Binary`, `Pointer`. |
| 597 | * `UnitQuaternion::quaternions_mean(...)` which computes the mean rotation of a set of unit quaternions. This implements |
| 598 | the algorithm from _Oshman, Yaakov, and Avishy Carmi, "Attitude estimation from vector observations using a |
| 599 | genetic-algorithm-embedded quaternion particle filter." |
| 600 | |
| 601 | ### Modified |
| 602 | |
| 603 | * It is now possible to get the `min/max` element of unsigned integer matrices. |
| 604 | |
| 605 | ### Added to nalgebra-glm |
| 606 | |
| 607 | * Some infinite and reversed perspectives: `::infinite_perspective_rh_no`, `::infinite_perspective_rh_zo`, |
| 608 | `::reversed_perspective_rh_zo`, and `::reversed_infinite_perspective_rh_zo`. |
| 609 | |
| 610 | ## [0.18.0] |
| 611 | |
| 612 | This release adds full complex number support to nalgebra. This includes all common vector/matrix operations as well |
| 613 | as matrix decomposition. This excludes geometric type (like `Isometry`, `Rotation`, `Translation`, etc.) from the |
| 614 | `geometry` module. |
| 615 | |
| 616 | ### Added |
| 617 | |
| 618 | #### Quaternion and geometric operations |
| 619 | |
| 620 | * Add trigonometric functions for |
| 621 | quaternions: `.cos, .sin, .tan, .acos, .asin, .atan, .cosh, .sinh, .tanh, .acosh, .asinh, .atanh`. |
| 622 | * Add geometric algebra operations for quaternions: `.inner, .outer, .project, .rejection` |
| 623 | * Add `.left_div, .right_div` for quaternions. |
| 624 | * Add `.renormalize` to `Unit<...>` and `Rotation3` to correct potential drift due to repeated operations. |
| 625 | Those drifts could cause them not to be pure rotations anymore. |
| 626 | |
| 627 | #### Convolution |
| 628 | |
| 629 | * `.convolve_full(kernel)` returns the convolution of `self` by `kernel`. |
| 630 | * `.convolve_valid(kernel)` returns the convolution of `self` by `kernel` after removal of all the elements relying on |
| 631 | zero-padding. |
| 632 | * `.convolve_same(kernel)` returns the convolution of `self` by `kernel` with a result of the same size as `self`. |
| 633 | |
| 634 | #### Complex number support |
| 635 | |
| 636 | * Add the `::from_matrix` constructor too all rotation types to extract a rotation from a raw matrix. |
| 637 | * Add the `::from_matrix_eps` constructor too all rotation types to extract a rotation from a raw matrix. This takes |
| 638 | more argument than `::from_matrix` to control the convergence of the underlying optimization algorithm. |
| 639 | * Add `.camax()` which returns the matrix component with the greatest L1-norm. |
| 640 | * Add `.camin()` which returns the matrix component with the smallest L1-norm. |
| 641 | * Add `.ad_mul(b)` for matrix-multiplication of `self.adjoint() * b`. |
| 642 | * Add `.ad_mul_to(b)` which is the same as `.ad_mul` but with a provided matrix to be filled with the result of the |
| 643 | multiplication. |
| 644 | * Add BLAS operations involving complex conjugation (following similar names as the original BLAS spec): |
| 645 | * `.dotc(rhs)` equal to `self.adjoint() * rhs`. |
| 646 | * `.gerc(alpha, x, y, beta)` equivalent to `self = alpha * x * y.adjoint() + beta * self` |
| 647 | * `.hegerc` which is like `gerc` but for Hermitian matrices. |
| 648 | * `.syger` which is the new name of `.ger_symm` which is equivalent |
| 649 | to `self = alpha * x * y.transpose() + beta * self`. |
| 650 | * `.sygemv` which is the new name of `.gemv_symm` which is equivalent to `self = alpha * a * x + beta * self` |
| 651 | with `a` symmetric. |
| 652 | * `.hegemv(alpha, a, x, beta)` which is like `.sygemv` but with `a` Hermitian. |
| 653 | * `.gemv_ad(alpha, a, x, beta)` which is equivalent to `self = alpha * a.adjoint() * x + beta * self`. |
| 654 | * `.gemm_ad(alpha, a, b, beta)` which is equivalent to `self = alpha * a.adjoint() * b + beta * self`. |
| 655 | * `.icamax()` which returns the index of the complex vector component with the greatest L1-norm. |
| 656 | |
| 657 | Note that all the other BLAS operation will continue to work for all fields, including floats and complex numbers. |
| 658 | |
| 659 | ### Renamed |
| 660 | |
| 661 | * `RealSchur` has been renamed `Schur` because it can now work with complex matrices. |
| 662 | |
| 663 | ## [0.17.0] |
| 664 | |
| 665 | ### Added |
| 666 | |
| 667 | * Add swizzling up to dimension 3 for vectors. For example, you can do `v.zxy()` as an equivalent |
| 668 | to `Vector3::new(v.z, v.x, v.y)`. |
| 669 | * Add swizzling up to dimension 3 for points. For example, you can do `p.zxy()` as an equivalent |
| 670 | to `Point3::new(p.z, p.x, p.y)`. |
| 671 | * Add `.copy_from_slice` to copy matrix components from a slice in column-major order. |
| 672 | * Add `.dot` to quaternions. |
| 673 | * Add `.zip_zip_map` for iterating on three matrices simultaneously, and applying a closure to them. |
| 674 | * Add `.slerp` and `.try_slerp` to unit vectors. |
| 675 | * Add `.lerp` to vectors. |
| 676 | * Add `.to_projective` and `.as_projective` to `Perspective3` and `Orthographic3` in order to |
| 677 | use them as `Projective3` structures. |
| 678 | * Add `From/Into` impls to allow the conversion of any transformation type to a matrix. |
| 679 | * Add `Into` impls to convert a matrix slice into an owned matrix. |
| 680 | * Add `Point*::from_slice` to create a point from a slice. |
| 681 | * Add `.map_with_location` to matrices to apply a map which passes the component indices to the user-defined closure |
| 682 | alongside |
| 683 | the component itself. |
| 684 | * Add impl `From<Vector>` for `Point`. |
| 685 | * Add impl `From<Vector4>` for `Quaternion`. |
| 686 | * Add impl `From<Vector>` for `Translation`. |
| 687 | * Add the `::from_vec` constructor to construct a matrix from a `Vec` (a `DMatrix` will reuse the original `Vec` |
| 688 | as-is for its storage). |
| 689 | * Add `.to_homogeneous` to square matrices (and with dimensions higher than 1x1). This will increase their number of row |
| 690 | and columns by 1. The new column and row are filled with 0, except for the diagonal element which is set to 1. |
| 691 | * Implement `Extend<Vec>` for matrices with a dynamic storage. The provided `Vec` is assumed to represent a column-major |
| 692 | matrix with the same number of rows as the one being extended. This will effectively append new columns on the right |
| 693 | of |
| 694 | the matrix being extended. |
| 695 | * Implement `Extend<Vec>` for vectors with a dynamic storage. This will concatenate the vector with the given `Vec`. |
| 696 | * Implement `Extend<Matrix<...>>` for matrices with dynamic storage. This will concatenate the columns of both matrices. |
| 697 | * Implement `Into<Vec>` for the `MatrixVec` storage. |
| 698 | * Implement `Hash` for all matrices. |
| 699 | * Add a `.len()` method to retrieve the size of a `MatrixVec`. |
| 700 | |
| 701 | ### Modified |
| 702 | |
| 703 | * The orthographic projection no longer require that `bottom < top`, that `left < right`, and that `znear < zfar`. The |
| 704 | only restriction now ith that they must not be equal (in which case the projection would be singular). |
| 705 | * The `Point::from_coordinates` methods is deprecated. Use `Point::from` instead. |
| 706 | * The `.transform_point` and `.transform_vector` methods are now inherent methods for matrices so that the user does not |
| 707 | have to |
| 708 | explicitly import the `Transform` trait from the alga crate. |
| 709 | * Renamed the matrix storage types: `MatrixArray` -> `ArrayStorage` and `MatrixVec` -> `VecStorage`. |
| 710 | * Renamed `.unwrap()` to `.into_inner()` for geometric types that wrap another type. |
| 711 | This is for the case of `Unit`, `Transform`, `Orthographic3`, `Perspective3`, `Rotation`. |
| 712 | * Deprecate several functions at the root of the crate (replaced by methods). |
| 713 | |
| 714 | ### Removed |
| 715 | |
| 716 | * Remove the `Deref` impl for `MatrixVec` as it could cause hard-to-understand compilation errors. |
| 717 | |
| 718 | ### nalgebra-glm |
| 719 | |
| 720 | * Add several alternative projection computations, e.g., `ortho_lh`, `ortho_lh_no`, `perspective_lh`, etc. |
| 721 | * Add features matching those of nalgebra, in particular:`serde-serialize`, `abmonation-serialize`, std` (enabled by |
| 722 | default). |
| 723 | |
| 724 | ## [0.16.0] |
| 725 | |
| 726 | All dependencies have been updated to their latest versions. |
| 727 | |
| 728 | ## Modified |
| 729 | |
| 730 | * Adjust `UnitQuaternion`s, `Rotation3`s, and `Rotation2`s generated from the `Standard` distribution to be uniformly |
| 731 | distributed. |
| 732 | |
| 733 | ### Added |
| 734 | |
| 735 | * Add a feature `stdweb` to activate the dependency feature `rand/stdweb`. |
| 736 | * Add blas-like methods `.imin()` and `.imax()` that return the index of the minimum and maximum entry of a vector. |
| 737 | * Add construction of a `Point` from an array by implementing the `From` trait. |
| 738 | * Add support for generating uniformly distributed random unit column vectors using the `Standard` distribution. |
| 739 | |
| 740 | ## [0.15.0] |
| 741 | |
| 742 | The most notable change of this release is the support for using part of the library without the rust standard |
| 743 | library (i.e. it supports `#![no_std]`). See the |
| 744 | corresponding [documentation](https://nalgebra.rs/wasm_and_embedded_programming/). |
| 745 | |
| 746 | ### Modified |
| 747 | |
| 748 | * Rename the `core` module to `base` to avoid conflicts with the `core` crate implicitly imported when |
| 749 | `#![no_std]` is enabled. |
| 750 | * Constructors of the `MatrixSlice*` types have been renamed from `new_*` to `from_slice_*`. This was |
| 751 | necessary to avoid the `incoherent_fundamental_impls` lint that is going to become a hard error. |
| 752 | |
| 753 | ### Added |
| 754 | |
| 755 | * Add `UnitQuaternion` constructor `::new_eps(...)` and `::from_scaled_axis_eps(...)` that return the |
| 756 | identity if the magnitude of the input axisangle is smaller than the epsilon provided. |
| 757 | * Add methods `.rotation_between_axis(...)` and `.scaled_rotation_between_axis(...)` to `UnitComplex` |
| 758 | to compute the rotation matrix between two 2D **unit** vectors. |
| 759 | * Add methods `.axis_angle()` to `UnitComplex` and `UnitQuaternion` in order to retrieve both the |
| 760 | unit rotation axis, and the rotation angle simultaneously. |
| 761 | * Add functions to construct a random matrix with a user-defined distribution: `::from_distribution(...)`. |
| 762 | |
| 763 | ## [0.14.0] |
| 764 | |
| 765 | ### Modified |
| 766 | |
| 767 | * Allow the `Isometry * Unit<Vector>` multiplication. |
| 768 | |
| 769 | ### Added |
| 770 | |
| 771 | * Add blas-like operations: `.quadform(...)` and `.quadform_tr(...)` to compute respectively |
| 772 | the quadratic forms `self = alpha * A.transpose() * B * A + beta * self` and |
| 773 | `alpha * A * B * A.transpose() + beta * self`. Here, `A, B` are matrices with |
| 774 | `B` square, and `alpha, beta` are reals. |
| 775 | * Add blas-like operations: `.gemv_tr(...)` that behaves like `.gemv` except that the |
| 776 | provided matrix is assumed to be transposed. |
| 777 | * Add blas-like operations: `cmpy, cdpy` for component-wise multiplications and |
| 778 | division with scalar factors: |
| 779 | - `self <- alpha * self + beta * a * b` |
| 780 | - `self <- alpha * self + beta * a / b` |
| 781 | * `.cross_matrix()` returns the cross-product matrix of a given 3D vector, i.e., |
| 782 | the matrix `M` such that for all vector `v` we have |
| 783 | `M * v == self.cross(&v)`. |
| 784 | * `.iamin()` that returns the index of the vector entry with |
| 785 | the smallest absolute value. |
| 786 | * The `mint` feature that can be enabled in order to allow conversions from |
| 787 | and to types of the [mint](https://crates.io/crates/mint) crate. |
| 788 | * Aliases for matrix and vector slices. Their are named by adding `Slice` |
| 789 | before the dimension numbers, i.e., a 3x5 matrix slice with dimensions known |
| 790 | at compile-time is called `MatrixSlice3x5`. A vector slice with dimensions |
| 791 | unknown at compile-time is called `DVectorSlice`. |
| 792 | * Add functions for constructing matrix slices from a slice `&[N]`, e.g., |
| 793 | `MatrixSlice2::new(...)` and `MatrixSlice2::new_with_strides(...)`. |
| 794 | * The `::repeat(...)` constructor that is an alternative name to |
| 795 | `::from_element(...)`. |
| 796 | * `UnitQuaternion::scaled_rotation_between_axis(...)` and |
| 797 | `UnitQuaternion::rotation_between_axis(...)` that take Unit vectors instead of |
| 798 | Vector as arguments. |
| 799 | |
| 800 | ## [0.13.0] |
| 801 | |
| 802 | The **nalgebra-lapack** crate has been updated. This now includes a broad range |
| 803 | matrix decompositions using LAPACK bindings. |
| 804 | |
| 805 | This adds support for serialization using the |
| 806 | [abomonation](https://crates.io/crates/abomonation) crate. |
| 807 | |
| 808 | ### Breaking semantic change |
| 809 | |
| 810 | * The implementation of slicing with steps now matches the documentation. |
| 811 | Before, step identified the number to add to pass from one column/row index |
| 812 | to the next one. This made 0 step invalid. Now (and on the documentation so |
| 813 | far), the step is the number of ignored row/columns between each |
| 814 | row/column. Thus, a step of 0 means that no row/column is ignored. For |
| 815 | example, a step of, say, 3 on previous versions should now bet set to 2. |
| 816 | |
| 817 | ### Modified |
| 818 | |
| 819 | * The trait `Axpy` has been replaced by a method `.axpy`. |
| 820 | * The alias `MatrixNM` is now deprecated. Use `MatrixMN` instead (we |
| 821 | reordered M and N to be in alphabetical order). |
| 822 | * In-place componentwise multiplication and division |
| 823 | `.component_mul_mut(...)` and `.component_div_mut(...)` have been deprecated |
| 824 | for a future renaming. Use `.component_mul_assign(...)` and |
| 825 | `.component_div_assign(...)` instead. |
| 826 | |
| 827 | ### Added |
| 828 | |
| 829 | * `alga::general::Real` is now re-exported by nalgebra. |
| 830 | elements.) |
| 831 | * `::zeros(...)` that creates a matrix filled with zeroes. |
| 832 | * `::from_partial_diagonal(...)` that creates a matrix from diagonal elements. |
| 833 | The matrix can be rectangular. If not enough elements are provided, the rest |
| 834 | of the diagonal is set to 0. |
| 835 | * `.conjugate_transpose()` computes the transposed conjugate of a |
| 836 | complex matrix. |
| 837 | * `.conjugate_transpose_to(...)` computes the transposed conjugate of a |
| 838 | complex matrix. The result written into a user-provided matrix. |
| 839 | * `.transpose_to(...)` is the same as `.transpose()` but stores the result in |
| 840 | the provided matrix. |
| 841 | * `.conjugate_transpose_to(...)` is the same as `.conjugate_transpose()` but |
| 842 | stores the result in the provided matrix. |
| 843 | * Implements `IntoIterator` for `&Matrix`, `&mut Matrix` and `Matrix`. |
| 844 | * `.mul_to(...)` multiplies two matrices and stores the result to the given buffer. |
| 845 | * `.tr_mul_to(...)` left-multiplies `self.transpose()` to another matrix and stores the result to the given buffer. |
| 846 | * `.add_scalar(...)` that adds a scalar to each component of a matrix. |
| 847 | * `.add_scalar_mut(...)` that adds in-place a scalar to each component of a matrix. |
| 848 | * `.kronecker(a, b)` computes the kronecker product (i.e. matrix tensor |
| 849 | product) of two matrices. |
| 850 | * `.apply(f)` replaces each component of a matrix with the results of the |
| 851 | closure `f` called on each of them. |
| 852 | |
| 853 | Pure Rust implementation of some Blas operations: |
| 854 | |
| 855 | * `.iamax()` returns the index of the maximum value of a vector. |
| 856 | * `.axpy(...)` computes `self = a * x + b * self`. |
| 857 | * `.gemv(...)` computes `self = alpha * a * x + beta * self` with a matrix and vector `a` and `x`. |
| 858 | * `.ger(...)` computes `self = alpha * x^t * y + beta * self` where `x` and `y` are vectors. |
| 859 | * `.gemm(...)` computes `self = alpha * a * b + beta * self` where `a` and `b` are matrices. |
| 860 | * `.gemv_symm(...)` is the same as `.gemv` except that `self` is assumed symmetric. |
| 861 | * `.ger_symm(...)` is the same as `.ger` except that `self` is assumed symmetric. |
| 862 | |
| 863 | New slicing methods: |
| 864 | |
| 865 | * `.rows_range(...)` that retrieves a reference to a range of rows. |
| 866 | * `.rows_range_mut(...)` that retrieves a mutable reference to a range of rows. |
| 867 | * `.columns_range(...)` that retrieves a reference to a range of columns. |
| 868 | * `.columns_range_mut(...)` that retrieves a mutable reference to a range of columns. |
| 869 | |
| 870 | Matrix decompositions implemented in pure Rust: |
| 871 | |
| 872 | * Cholesky, SVD, LU, QR, Hessenberg, Schur, Symmetric eigendecompositions, |
| 873 | Bidiagonal, Symmetric tridiagonal |
| 874 | * Computation of householder reflectors and givens rotations. |
| 875 | |
| 876 | Matrix edition: |
| 877 | |
| 878 | * `.upper_triangle()` extracts the upper triangle of a matrix, including the diagonal. |
| 879 | * `.lower_triangle()` extracts the lower triangle of a matrix, including the diagonal. |
| 880 | * `.fill(...)` fills the matrix with a single value. |
| 881 | * `.fill_with_identity(...)` fills the matrix with the identity. |
| 882 | * `.fill_diagonal(...)` fills the matrix diagonal with a single value. |
| 883 | * `.fill_row(...)` fills a selected matrix row with a single value. |
| 884 | * `.fill_column(...)` fills a selected matrix column with a single value. |
| 885 | * `.set_diagonal(...)` sets the matrix diagonal. |
| 886 | * `.set_row(...)` sets a selected row. |
| 887 | * `.set_column(...)` sets a selected column. |
| 888 | * `.fill_lower_triangle(...)` fills some sub-diagonals below the main diagonal with a value. |
| 889 | * `.fill_upper_triangle(...)` fills some sub-diagonals above the main diagonal with a value. |
| 890 | * `.swap_rows(...)` swaps two rows. |
| 891 | * `.swap_columns(...)` swaps two columns. |
| 892 | |
| 893 | Column removal: |
| 894 | |
| 895 | * `.remove_column(...)` removes one column. |
| 896 | * `.remove_fixed_columns<D>(...)` removes `D` columns. |
| 897 | * `.remove_columns(...)` removes a number of columns known at run-time. |
| 898 | |
| 899 | Row removal: |
| 900 | |
| 901 | * `.remove_row(...)` removes one row. |
| 902 | * `.remove_fixed_rows<D>(...)` removes `D` rows. |
| 903 | * `.remove_rows(...)` removes a number of rows known at run-time. |
| 904 | |
| 905 | Column insertion: |
| 906 | |
| 907 | * `.insert_column(...)` adds one column at the given position. |
| 908 | * `.insert_fixed_columns<D>(...)` adds `D` columns at the given position. |
| 909 | * `.insert_columns(...)` adds at the given position a number of columns known at run-time. |
| 910 | |
| 911 | Row insertion: |
| 912 | |
| 913 | * `.insert_row(...)` adds one row at the given position. |
| 914 | * `.insert_fixed_rows<D>(...)` adds `D` rows at the given position. |
| 915 | * `.insert_rows(...)` adds at the given position a number of rows known at run-time. |
| 916 | |
| 917 | ## [0.12.0] |
| 918 | |
| 919 | The main change of this release is the update of the dependency serde to 1.0. |
| 920 | |
| 921 | ### Added |
| 922 | |
| 923 | * `.trace()` that computes the trace of a matrix (the sum of its diagonal |
| 924 | elements.) |
| 925 | |
| 926 | ## [0.11.0] |
| 927 | |
| 928 | The [website](https://nalgebra.rs) has been fully rewritten and gives a good |
| 929 | overview of all the added/modified features. |
| 930 | |
| 931 | This version is a major rewrite of the library. Major changes are: |
| 932 | |
| 933 | * Algebraic traits are now defined by the [alga](https://crates.io/crates/alga) crate. |
| 934 | All other mathematical traits, except `Axpy` have been removed from |
| 935 | **nalgebra**. |
| 936 | * Methods are now preferred to free functions because they do not require any |
| 937 | trait to be used anymore. |
| 938 | * Most algebraic entities can be parametrized by type-level integers |
| 939 | to specify their dimensions. Using `Dynamic` instead of a type-level |
| 940 | integer indicates that the dimension known at run-time only. |
| 941 | * Statically-sized **rectangular** matrices. |
| 942 | * More transformation types have been added: unit-sized complex numbers (for |
| 943 | 2D rotations), affine/projective/general transformations with `Affine2/3`, |
| 944 | `Projective2/3`, and `Transform2/3`. |
| 945 | * Serde serialization is now supported instead of `rustc_serialize`. Enable |
| 946 | it with the `serde-serialize` feature. |
| 947 | * Matrix **slices** are now implemented. |
| 948 | |
| 949 | ### Added |
| 950 | |
| 951 | Lots of features including rectangular matrices, slices, and Serde |
| 952 | serialization. Refer to the brand new [website](https://nalgebra.rs) for more |
| 953 | details. The following free-functions have been added as well: |
| 954 | |
| 955 | * `::id()` that returns the universal [identity element](https://nalgebra.rs/performance_tricks/#the-id-type) |
| 956 | of type `Id`. |
| 957 | * `::inf_sup()` that returns both the infimum and supremum of a value at the |
| 958 | same time. |
| 959 | * `::partial_sort2()` that attempts to sort two values in increasing order. |
| 960 | * `::wrap()` that moves a value to the given interval by adding or removing |
| 961 | the interval width to it. |
| 962 | |
| 963 | ### Modified |
| 964 | |
| 965 | * `::cast` -> `::convert` |
| 966 | * `point.as_vector()` -> `point.coords` |
| 967 | * `na::origin` -> `P::origin()` |
| 968 | * `na::is_zero` -> `.is_zero()` (from num::Zero) |
| 969 | * `.transform` -> `.transform_point`/`.transform_vector` |
| 970 | * `.translate` -> `.translate_point` |
| 971 | * `::dimension::<P>` -> `::dimension::<P::Vector>` |
| 972 | * `::angle_between` -> `::angle` |
| 973 | |
| 974 | Componentwise multiplication and division has been replaced by methods: |
| 975 | |
| 976 | * multiplication -> `.componentwise_mul`, `.componentwise_mul_mut`. |
| 977 | * division -> `.componentwise_div`, `.componentwise_div_mut`. |
| 978 | |
| 979 | The following free-functions are now replaced by methods (with the same names) |
| 980 | only: |
| 981 | `::cross`, `::cholesky`, `::determinant`, `::diagonal`, `::eigen_qr` (becomes |
| 982 | `.eig`), `::hessenberg`, `::qr`, `::to_homogeneous`, `::to_rotation_matrix`, |
| 983 | `::transpose`, `::shape`. |
| 984 | |
| 985 | The following free-functions are now replaced by static methods only: |
| 986 | |
| 987 | * `::householder_matrix` under the name `::new_householder_generic` |
| 988 | * `::identity` |
| 989 | * `::new_identity` under the name `::identity` |
| 990 | * `::from_homogeneous` |
| 991 | * `::repeat` under the name `::from_element` |
| 992 | |
| 993 | The following free-function are now replaced methods accessible through traits |
| 994 | only: |
| 995 | |
| 996 | * `::transform` -> methods `.transform_point` and `.transform_vector` of the `alga::linear::Transformation` trait. |
| 997 | * `::inverse_transform` -> methods `.inverse_transform_point` and |
| 998 | `.inverse_transform_vector` of the `alga::linear::ProjectiveTransformation` |
| 999 | trait. |
| 1000 | * `::translate`, `::inverse_translate`, `::rotate`, `::inverse_rotate` -> |
| 1001 | methods from the `alga::linear::Similarity` trait instead. Those have the |
| 1002 | same names but end with `_point` or `_vector`, e.g., `.translate_point` and |
| 1003 | `.translate_vector`. |
| 1004 | * `::orthonormal_subspace_basis` -> method with the same name from |
| 1005 | `alga::linear::FiniteDimInnerSpace`. |
| 1006 | * `::canonical_basis_element` and `::canonical_basis` -> methods with the |
| 1007 | same names from `alga::linear::FiniteDimVectorSpace`. |
| 1008 | * `::rotation_between` -> method with the same name from the |
| 1009 | `alga::linear::Rotation` trait. |
| 1010 | * `::is_zero` -> method with the same name from `num::Zero`. |
| 1011 | |
| 1012 | ### Removed |
| 1013 | |
| 1014 | * The free functions `::prepend_rotation`, `::append_rotation`, |
| 1015 | `::append_rotation_wrt_center`, `::append_rotation_wrt_point`, |
| 1016 | `::append_transformation`, and `::append_translation ` have been removed. |
| 1017 | Instead, create the rotation or translation object explicitly and use |
| 1018 | multiplication to compose it with anything else. |
| 1019 | |
| 1020 | * The free function `::outer` has been removed. Use column-vector × |
| 1021 | row-vector multiplication instead. |
| 1022 | |
| 1023 | * `::approx_eq`, `::approx_eq_eps` have been removed. Use the `relative_eq!` |
| 1024 | macro from the [approx](https://crates.io/crates/approx) crate instead. |
| 1025 | |
| 1026 | * `::covariance` has been removed. There is no replacement for now. |
| 1027 | * `::mean` has been removed. There is no replacement for now. |
| 1028 | * `::sample_sphere` has been removed. There is no replacement for now. |
| 1029 | * `::cross_matrix` has been removed. There is no replacement for now. |
| 1030 | * `::absolute_rotate` has been removed. There is no replacement for now. |
| 1031 | * `::rotation`, `::transformation`, `::translation`, `::inverse_rotation`, |
| 1032 | `::inverse_transformation`, `::inverse_translation` have been removed. Use |
| 1033 | the appropriate methods/field of each transformation type, e.g., |
| 1034 | `rotation.angle()` and `rotation.axis()`. |
| 1035 | |
| 1036 | ## [0.10.0] |
| 1037 | |
| 1038 | ### Added |
| 1039 | |
| 1040 | Binary operations are now allowed between references as well. For example |
| 1041 | `Vector3<f32> + &Vector3<f32>` is now possible. |
| 1042 | |
| 1043 | ### Modified |
| 1044 | |
| 1045 | Removed unused parameters to methods from the `ApproxEq` trait. Those were |
| 1046 | required before rust 1.0 to help type inference. They are not needed any more |
| 1047 | since it now allowed to write for a type `T` that implements `ApproxEq`: |
| 1048 | `<T as ApproxEq>::approx_epsilon()`. This replaces the old form: |
| 1049 | `ApproxEq::approx_epsilon(None::<T>)`. |
| 1050 | |
| 1051 | ## [0.9.0] |
| 1052 | |
| 1053 | ### Modified |
| 1054 | |
| 1055 | * Renamed: |
| 1056 | - `::from_col_vector` -> `::from_column_vector` |
| 1057 | - `::from_col_iter` -> `::from_column_iter` |
| 1058 | - `.col_slice` -> `.column_slice` |
| 1059 | - `.set_col` -> `.set_column` |
| 1060 | - `::canonical_basis_with_dim` -> `::canonical_basis_with_dimension` |
| 1061 | - `::from_elem` -> `::from_element` |
| 1062 | - `DiagMut` -> `DiagonalMut` |
| 1063 | - `UnitQuaternion::new` becomes `UnitQuaternion::from_scaled_axis` or |
| 1064 | `UnitQuaternion::from_axisangle`. The new `::new` method now requires a |
| 1065 | not-normalized quaternion. |
| 1066 | |
| 1067 | Method names starting with `new_with_` now start with `from_`. This is more |
| 1068 | idiomatic in Rust. |
| 1069 | |
| 1070 | The `Norm` trait now uses an associated type instead of a type parameter. |
| 1071 | Other similar trait changes are to be expected in the future, e.g., for the |
| 1072 | `Diagonal` trait. |
| 1073 | |
| 1074 | Methods marked `unsafe` for reasons unrelated to memory safety are no |
| 1075 | longer unsafe. Instead, their name end with `_unchecked`. In particular: |
| 1076 | |
| 1077 | * `Rotation3::new_with_matrix` -> `Rotation3::from_matrix_unchecked` |
| 1078 | * `PerspectiveMatrix3::new_with_matrix` -> `PerspectiveMatrix3::from_matrix_unchecked` |
| 1079 | * `OrthographicMatrix3::new_with_matrix` -> `OrthographicMatrix3::from_matrix_unchecked` |
| 1080 | |
| 1081 | ### Added |
| 1082 | |
| 1083 | - A `Unit<T>` type that wraps normalized values. In particular, |
| 1084 | `UnitQuaternion<N>` is now an alias for `Unit<Quaternion<N>>`. |
| 1085 | - `.ln()`, `.exp()` and `.powf(..)` for quaternions and unit quaternions. |
| 1086 | - `::from_parts(...)` to build a quaternion from its scalar and vector |
| 1087 | parts. |
| 1088 | - The `Norm` trait now has a `try_normalize()` that returns `None` if the |
| 1089 | norm is too small. |
| 1090 | - The `BaseFloat` and `FloatVector` traits now inherit from `ApproxEq` as |
| 1091 | well. It is clear that performing computations with floats requires |
| 1092 | approximate equality. |
| 1093 | |
| 1094 | Still WIP: add implementations of abstract algebra traits from the `algebra` |
| 1095 | crate for vectors, rotations and points. To enable them, activate the |
| 1096 | `abstract_algebra` feature. |
| 1097 | |
| 1098 | ## [0.8.0] |
| 1099 | |
| 1100 | ### Modified |
| 1101 | |
| 1102 | * Almost everything (types, methods, and traits) now use fulls names instead |
| 1103 | of abbreviations (e.g. `Vec3` becomes `Vector3`). Most changes are obvious. |
| 1104 | Note however that: |
| 1105 | - `::sqnorm` becomes `::norm_squared`. |
| 1106 | - `::sqdist` becomes `::distance_squared`. |
| 1107 | - `::abs`, `::min`, etc. did not change as this is a common name for |
| 1108 | absolute values on, e.g., the libc. |
| 1109 | - Dynamically sized structures keep the `D` prefix, e.g., `DMat` becomes |
| 1110 | `DMatrix`. |
| 1111 | * All files with abbreviated names have been renamed to their full version, |
| 1112 | e.g., `vec.rs` becomes `vector.rs`. |
| 1113 | |
| 1114 | ## [0.7.0] |
| 1115 | |
| 1116 | ### Added |
| 1117 | |
| 1118 | * Added implementation of assignment operators (+=, -=, etc.) for |
| 1119 | everything. |
| 1120 | |
| 1121 | ### Modified |
| 1122 | |
| 1123 | * Points and vectors are now linked to each other with associated types |
| 1124 | (on the PointAsVector trait). |
| 1125 | |
| 1126 | ## [0.6.0] |
| 1127 | |
| 1128 | **Announcement:** a users forum has been created for `nalgebra`, `ncollide`, and `nphysics`. See |
| 1129 | you [there](https://users.nphysics.org)! |
| 1130 | |
| 1131 | ### Added |
| 1132 | |
| 1133 | * Added a dependency to [generic-array](https://crates.io/crates/generic-array). Feature-gated: |
| 1134 | requires `features="generic_sizes"`. |
| 1135 | * Added statically sized vectors with user-defined sizes: `VectorN`. Feature-gated: requires |
| 1136 | `features="generic_sizes"`. |
| 1137 | * Added similarity transformations (an uniform scale followed by a rotation followed by a |
| 1138 | translation): `Similarity2`, `Similarity3`. |
| 1139 | |
| 1140 | ### Removed |
| 1141 | |
| 1142 | * Removed zero-sized elements `Vector0`, `Point0`. |
| 1143 | * Removed 4-dimensional transformations `Rotation4` and `Isometry4` (which had an implementation too incomplete to be |
| 1144 | useful). |
| 1145 | |
| 1146 | ### Modified |
| 1147 | |
| 1148 | * Vectors are now multipliable with isometries. This will result into a pure rotation (this is how |
| 1149 | vectors differ from point semantically: they design directions, so they are not translatable). |
| 1150 | * `{Isometry3, Rotation3}::look_at` reimplemented and renamed to `::look_at_rh` and `::look_at_lh` to agree |
| 1151 | with the computer graphics community (in particular, the GLM library). Use the `::look_at_rh` |
| 1152 | variant to build a view matrix that |
| 1153 | may be successfully used with `Persp` and `Ortho`. |
| 1154 | * The old `{Isometry3, Rotation3}::look_at` implementations are now called `::new_observer_frame`. |
| 1155 | * Rename every `fov` on `Persp` to `fovy`. |
| 1156 | * Fixed the perspective and orthographic projection matrices. |