Skip to content

Upgrading nalgebra 0.10 to 0.11

Breaking0.10.1 → 0.11.2Breaking22New5Changed3

BreakingUpgrade verdict

22 breaking changes.

  • The cast function is now called convert.
  • The angle_between function is now called angle.
  • These composition helpers are gone; build the rotation or translation object yourself and multiply it onto the value.
  • The outer-product helper is gone; multiply a column vector by a row vector to get the same result.
Top 3 of 22 that need code or config changes

Adds alga ^0.5, approx ^0.1, num-complex ^0.1, num-traits ^0.1, serde ^0.9, serde_derive ^0.9, serde_json ^0.9.

Drops algebra, num, rustc-serialize.

Installs 43 packages in all (was 36).

Breaking22
Renames ::cast to ::convert.
::cast::convert
Renames ::angle_between to ::angle.
::angle_between::angle
Removes the free functions ::prepend_rotation, ::append_rotation, ::append_rotation_wrt_center, ::append_rotation_wrt_point, ::append_transformation and ::append_translation.
prepend_rotationappend_rotationappend_rotation_wrt_centerappend_rotation_wrt_pointappend_transformationappend_translation
Removes the free function ::outer; use column-vector times row-vector multiplication instead.
outer
Removes ::approx_eq and ::approx_eq_eps; use the relative_eq! macro from the approx crate instead.
approx_eqapprox_eq_epsrelative_eq!
Removes ::covariance with no replacement for now.
covariance
Removes ::mean with no replacement for now.
mean
Removes ::sample_sphere with no replacement for now.
sample_sphere
Removes ::cross_matrix with no replacement for now.
cross_matrix
Removes ::absolute_rotate, with no replacement for now.
::absolute_rotate
Removes ::rotation, ::transformation, ::translation, ::inverse_rotation, ::inverse_transformation and ::inverse_translation.
::rotation::transformation::translation::inverse_rotation::inverse_transformation::inverse_translationrotation.angle()rotation.axis()
Replaces point.as_vector() with the point.coords field.
point.as_vector()point.coords
Replaces na::origin with P::origin().
na::originP::origin()
Replaces na::is_zero with the .is_zero() method from num::Zero.
na::is_zero.is_zero()num::Zero
Replaces .transform with .transform_point or .transform_vector.
.transform.transform_point.transform_vector
Replaces .translate with .translate_point.
.translate.translate_point
Changes ::dimension::<P> to ::dimension::<P::Vector>.
::dimension::<P>::dimension::<P::Vector>
Replaces componentwise multiplication and division with .componentwise_mul, .componentwise_mul_mut, and division methods.
.componentwise_mul.componentwise_mul_mut
Replaces the free function ::division with the .componentwise_div and .componentwise_div_mut methods.
componentwise_divcomponentwise_div_mut
Replaces several free functions with methods of the same name, including ::cross, ::cholesky, ::determinant, ::diagonal, ::hessenberg, ::qr, ::transpose and ::shape.
crosscholeskydeterminantdiagonaleigen_qreighessenbergqr
Replaces several free functions with static methods, renaming ::householder_matrix to ::new_householder_generic, ::new_identity to ::identity and ::repeat to ::from_element.
householder_matrixnew_householder_genericidentitynew_identityfrom_homogeneousrepeatfrom_element
Replaces several free functions with trait methods from alga, such as .transform_point, .transform_vector, .translate_point and .is_zero.
transform_pointtransform_vectorinverse_transform_pointinverse_transform_vectortranslate_pointtranslate_vectororthonormal_subspace_basisis_zero