The `Unit` wrapper type ensures that elements of the underlying type has a unit norm.
For example, `Unit<Vector3>` designates an element of S².
In particular `UnitQuaternion<N>` is now a type alias for `Unit<Quaternion<N>>`.
Use `::angle_between` or `.angle_to` to compute the rotation angle between two vectors/rotation
matrices/unit quaternions.
Use `::rotation_between` or `.rotation_to` to compute the rotation matrix/unit quaternion to
transform a vector/rotation matrix/uniq quaternion to another.
Fix#130.
Use associated types for the `Outer` trait.
Add a `Repeat` trait for constructing a multidimensional value by repeating an element.
Split the `Diag` trait into `Diag` and `DiagMut`.
Implement `RustEncodable` for `Identity`.
The LMul, RMul and Scalar* traits were only necessary due to language
limitations regarding trait bounds that are now gone. The Mat trait is now
expressed in terms of regular operator traits.
However, due to the removal of these traits this constitutes a breaking change.
Fixes#52.
This renames pairs of methods like `normalize_cpy`, `normalize` to `normalize`
and `normalize_mut`. Note that the previous in-place operations had the same
name that now belongs to the copy operations. Therefore this is a breaking
change.
On a similar note, the `Quat::conjugate` method was also renamed to
`conjugate_mut` and a new copying method has taken its place. This appears to
be a similar issue (apart from the lack of the copy operation) and thus was
dealt with here, too.
Just as the standard library's PartialEq is implemented for reference types,
the ApproxEq trait should be implemented on them as well. This is mostly an
ergonomic improvement for certain testing situations, where a method yields a
reference. For non-copy types it allows using the assert_approx_… macros, which
would otherwise not be possible.
approx_eq_ulps() allows specification of epsilon as an integer number
of Units in the Last Place (ULPs) difference between the two floating
point values
default approx_ulps() is set to 8.
approx_eq() function continues to use epsilon method, although I
recommend further commits and a migration towards the ULPs method.