cgmath-rs v0.7.0 Release Notes

Release Date: 2015-12-23 // over 8 years ago
  • โž• Added

    • โž• Add missing by-ref and by-val permutations of Vector, Matrix, Point, Quaternion and Angle operators.
    • Ease lifetime constraints by removing 'static from some scalar type parameters.
    • Weaken type constraints on perspective function to take an Into<Rad<S>>.
    • โž• Add Angle::new for constructing angles from a unitless scalar.
    • ๐Ÿ— Implement assignment operators for nightly builds, enabled by the "unstable" feature.

    ๐Ÿ”„ Changed

    • Vector, Matrix, Point, and Angle are now constrained to require specific operators to be overloaded. This means that generic code can now use operators, instead of the operator methods.
    • Take a Rad for ProjectionFov::fovy, rather than arbitrary Angles. This simplifies the signature of PerspectiveFov from PerspectiveFov<S, A> to PerspectiveFov<S>.
    • ๐Ÿšš The following trait constraints were removed from Angle: Debug, ScalarConv, Into<Rad<S>>, Into<Deg<S>>.
    • ๐Ÿšš Angle no longer requires One, and the implementations have been removed from Deg and Rad. This is because angles do not close over multiplication, and therefore cannot have a multiplicative identity. If we were truly accurate, Angle * Angle would return an Angle^2 (not supported by the current api).
    • ๐Ÿ‘‰ Make remainder operators on Angles make sense from the perspective of dimensional analysis.
    • ๐Ÿšš Moved free trigonometric functions onto Angle.

    โœ‚ Removed

    • โœ‚ Remove redundant Point::{min, max} methods - these are now covered by the Array::{min, max} methods that were introduced in 0.5.0.
    • โœ‚ Removed ToComponents, ToComponents2, and ToComponents3. If you were relying on ToComponents::decompose, you can produce the same effect by accessing the fields on Decomposed directly. To create the scale vector, use: Vector::from_value(transform.scale).
    • โœ‚ Removed CompositeTransform, CompositeTransform2, and CompositeTransform3.
    • โœ‚ Remove Vector::one. Vectors don't really have a multiplicative identity. If you really want a one vector, you can do something like: Vector::from_value(1.0).
    • โœ‚ Remove operator methods from Vector, Matrix, Point, and Angle traits in favor of operator overloading.
    • โœ‚ Remove *_self methods from Vector, Matrix, Point, and Angle. The operator methods can be used via the unstable assignment operators.
    • โœ‚ Remove #[derive(Hash)] from Deg and Rad. This could never really be used these types, because they expect to be given a BaseFloat under normal circumstances.