Most users probably don't use the rand impls, so the `rand` crate pulls
a large number of dependencies into the dependency tree which is just
wasted compilation time.
480: Add documentation for `<Quaternion as Rotation<Point3<S>>>::rotate_vector` r=kvark a=tangmi
Clarifies that a quaternion should be normalized to be used as a rotation. Does not enforce or assert that the quaternion is normalized because valid rotations can be slightly off of the unit quaternion due to floating point error.
Fixes#479.
Co-authored-by: Michael Tang <tangmi@uw.edu>
476: Add short constructors for points, to match the ones for vectors r=kvark a=nstoddard
In my code I find that I need to create points almost as often as vectors, so having short constructors is helpful.
Co-authored-by: Nathan Stoddard <nstoddard@users.noreply.github.com>
478: Readme links update, let travis fail on nightly r=kvark a=kvark
This is unfortunate, but it appears that we need to move to the new SIMD API in order to unblock it.
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
438: Angle: add the normalize_zero method r=kvark a=mathstuf
This method is like `normalize` except that it normalizes to have an
absolute value of no more than `turn_div_2`.
---
This is useful for making sure that an angle is no more than some offset from a target angle (e.g., implementing maximum turn rates in games).
Co-authored-by: Ben Boeckel <mathstuf@gmail.com>
472: [breaking] Move lerp() from InnerSpace to VectorSpace r=Rhuagh a=Vlad-Shcherbina
Because it does not require dot product.
Along the way, fix the comment.
Fixes#471.
Co-authored-by: Vlad Shcherbina <vlad.shcherbina@gmail.com>
475: Declare vector constructors to be const r=kvark a=nstoddard
This makes it easier to create vectors in constants.
Co-authored-by: Nathan Stoddard <nstoddard@users.noreply.github.com>
Also add const to a vector constructor that I missed before.
Constructors for other types can't yet be const, because the compiler gives an error: "trait bounds other than `Sized` on const fn parameters are unstable".
Those links were broken before, since the [] and () part were split
into two different lines. This also caused warnings on nightly, which
are now fixed.