mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 06:00:20 +00:00
83ee6de1da
This removes the `From<Vec2/3>` implementations for the direction types. It doesn't seem right to have when it only works if the vector is nonzero and finite and produces NaN otherwise. Added `Direction2d/3d::new` which uses `Vec2/3::try_normalize` to guarantee it returns either a valid direction or `None`. This should make it impossible to create an invalid direction, which I think was the intention with these types. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |