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 performnace in algorithms where you need to get values for a particular axis often.
An aspect ratio represented as a fraction so that there is no precision loss.
Represents a Vec2 with the specified aspect ratio and the specified width. The height of the Vec2 can be inferred by the aspect ratio.
A 1D range. Internally represented as start and end. (as opposed to a start and length) This means that subdivision does not result in any floating point calculations. The start value must be <= the end value. There is no protection against "degenerate" Ranges where start>end. Behavior of any of the functions with degenrate Ranges is unspecified.
An axis aligned rectangle. Stored as two Ranges. It is a semi-closed rectangle. A point is considered inside the rectangle if it is in [start,end) for both x and y.
A 2D vector.
The x axis implementation of the Axis
The y axis implementation of the Axis
Describes if a ray hit a rectangle.
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.
Cast an array of 2 elements of primitive type to another primitive type using "as" on each element.
Convenience function to create a Range.
Convenience function to create a ray.
Convenience function to create a Rect.
Convenience function to create a vector.
Convenience function to create a vector where both component are the same.