Crate riddle_math[][src]

Riddle crate supplying basic math types and utilities to allow easy interop between riddle crates.

The crate also re-exports mint, which is used in some of the public APIs. Mint has become somewhat of a standard for linear algebra type interop.

Other riddle crates, and users of riddle should not rely on this crate for efficient math operations - it provides API level utilities. Libraries such as cgmath, glam, and nalgebra, to name but a few options, should be used by client code to perform efficient linear algebra calculations where needed.

Re-exports

pub use mint;

Structs

Rect

An axis aligned 2d rectangle with both a location and size.

Vector2

A basic 2d vector, supporting a small selection of operations

Traits

SignedSpacialNumeric

Types which as well as being defined as SpacialNumeric, may be negated.

SpacialNumeric

Numeric types over which crate::Rect and crate::Vector2 are defined

SpacialNumericConversion

Define the conversion between two SpacialNumeric types.

Functions

vec2

Utility function to abbreviate Vector2 creation