bevy/crates/bevy_math
Alice Cecile cca4fc76de
Add compass direction constants to Dir2 (#13636)
# Objective

When working on `leafwing-input-manager` and in my games, I've found
these compass directions to be both clear and useful when attempting to
describe angles in 2 dimensions.

This was directly used when mapping gamepad inputs into 4-way movement
as a virtual dpad, and I expect other uses are common in games.

## Solution

- Add constants corresponding to the 4 cardinal and 4 semi-cardinal
directions.

## Testing

- I've validated the quadrants of each of the directions through
self-review.

---------

Co-authored-by: Alice Cecile <alice.i.cecil@gmail.com>
2024-06-03 15:14:13 +00:00
..
src Add compass direction constants to Dir2 (#13636) 2024-06-03 15:14:13 +00:00
Cargo.toml Implemented Reflect for (almost) all bevy_math types (#13537) 2024-05-27 18:18:10 +00:00
README.md Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00

Bevy Math

License Crates.io Downloads Docs Discord