glam v0.21.0 Release Notes

Release Date: 2022-06-22 // almost 2 years ago
  • 💥 Breaking changes

    • 👍 Minimum Supported Version of Rust bumped to 1.58.1 to allow const pointer dereferences in constant evaluation.

    • The abs_diff_eq method on Mat2 and DMat2 now takes other by value instead of reference. This is consistent with the other matrix types.

    • The AsMut and Deref trait implementations on Quat and DQuat was removed. Quaternion fields are now public.

    • 🚚 The AsRef trait implementations were removed from BVec2, BVec3, BVec3A, BVec4 and BVec4A.

    ➕ Added

    • NEG_ONE constant was added to all signed vector types.

    • NEG_X, NEG_Y, NEG_Z and NEG_W negative axis vectors were added to signed vector types.

    • The rotate and from_angle methods were added to Vec2 and DVec2. from_angle returns a 2D vector containing [angle.cos(), angle.sin()] that can be used to rotate another 2D vector.

    • The from_array const function was added to all vector types.

    🔄 Changed

    • 🚚 Source code is now largely generated. This removes most usage of macros internally to improve readability. There should be no change in API or behavior other than what is documented here.

    • Many methods have been made const fn:

      • new, splat, from_slice, to_array and extend on vector types
      • from_cols, from_cols_array, from_cols_array_2d, from_cols_slice on matrix types
      • from_xyzw and from_array on quaternion types
      • from_cols on affine types
    • 🗄 The const new macros where deprecated.

    ✂ Removed

    • ✂ Deleted deprecated TransformRT and TransformSRT types.