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
andAngle
operators. - Ease lifetime constraints by removing
'static
from some scalar type parameters. - Weaken type constraints on
perspective
function to take anInto<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
, andAngle
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
forProjectionFov::fovy
, rather than arbitraryAngle
s. This simplifies the signature ofPerspectiveFov
fromPerspectiveFov<S, A>
toPerspectiveFov<S>
. - ๐ The following trait constraints were removed from
Angle
:Debug
,ScalarConv
,Into<Rad<S>>
,Into<Deg<S>>
. - ๐
Angle
no longer requiresOne
, and the implementations have been removed fromDeg
andRad
. 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 anAngle^2
(not supported by the current api). - ๐ Make remainder operators on
Angle
s 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 theArray::{min, max}
methods that were introduced in 0.5.0. - โ Removed
ToComponents
,ToComponents2
, andToComponents3
. If you were relying onToComponents::decompose
, you can produce the same effect by accessing the fields onDecomposed
directly. To create the scale vector, use:Vector::from_value(transform.scale)
. - โ Removed
CompositeTransform
,CompositeTransform2
, andCompositeTransform3
. - โ Remove
Vector::one
. Vectors don't really have a multiplicative identity. If you really want aone
vector, you can do something like:Vector::from_value(1.0)
. - โ Remove operator methods from
Vector
,Matrix
,Point
, andAngle
traits in favor of operator overloading. - โ Remove
*_self
methods fromVector
,Matrix
,Point
, andAngle
. The operator methods can be used via the unstable assignment operators. - โ Remove
#[derive(Hash)]
fromDeg
andRad
. This could never really be used these types, because they expect to be given aBaseFloat
under normal circumstances.
- โ Add missing by-ref and by-val permutations of