Expand description
A library that provides a way to easily extract 1d ranges from a 2d container based off of the x or y axis statically through type parameters. This can help with performance in algorithms where you need to get values for a particular axis often.
Re-exports§
pub use roots;
pub use num_traits;
pub use partial_min_max;
Structs§
- Range
- A 1D range. Internally represented as start and end. (as opposed to a start and length) If range A contains value x and range B contains value x, then A intersects B. There is no protection against “degenerate” Ranges where start>end.
- Ray
- A Ray.
- Rect
- An axis aligned rectangle. Stored as two Ranges.
- Vec2
- A 2D vector.
- XAXIS
- The x axis implementation of the Axis
- YAXIS
- The y axis implementation of the Axis
Enums§
- AxisDyn
- A dynamic axis as opposed to a statically known one via
impl Axis
. - Cast
Result - Describes if a ray hit a rectangle.
Traits§
- Axis
- Axis trait can be used to extract the x or y portions of a container. when you know the axis as compile time. The X implementation of this trait’s Next associated trait is the Y implementation. The Y implementation of this trait’s Next associated trait is the X implementation.
Functions§
- arr2_as
- Cast an array of 2 elements of primitive type to another primitive type using “as” on each element.
- range
- Convenience function to create a Range.
- ray
- Convenience function to create a ray.
- rect
- Convenience function to create a Rect.
- vec2
- Convenience function to create a vector.
- vec2same
- Convenience function to create a vector where both component are the same.