Additional doc aliases for WindingOrder in bevy_math (#13065)

# Objective

Adds a few extra `#[doc(alias)]` entries to the
`bevy_math::primitives::WindingOrder` enum and its variants to improve
searchability.

## Solution

- Add "Orientation" for `WindingOrder` itself
- Add "AntiClockwise" for `CounterClockwise` variant
- Add "Collinear" for `Invalid` variant

These alternate terms seem to be quite common, especially in the
contexts of rendering and collision-detection.

Signed-off-by: Nullicorn <git@nullicorn.me>
This commit is contained in:
nullicorn 2024-04-22 17:50:27 -04:00 committed by GitHub
parent e1ee6af275
commit f496d2a3c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,13 +17,15 @@ pub trait Primitive3d {}
/// The winding order for a set of points
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[doc(alias = "Orientation")]
pub enum WindingOrder {
/// A clockwise winding order
Clockwise,
/// A counterclockwise winding order
#[doc(alias = "AntiClockwise")]
CounterClockwise,
/// An invalid winding order indicating that it could not be computed reliably.
/// This often happens in *degenerate cases* where the points lie on the same line
#[doc(alias = "Degenerate")]
#[doc(alias("Degenerate", "Collinear"))]
Invalid,
}