pub trait GridPrecision: Default + PartialEq + Eq + PartialOrd + Ord + Hash + Copy + Clone + Send + Sync + Reflect + Add + Debug + Display + 'static {
    const ZERO: Self;
    const ONE: Self;

    fn wrapping_add(self, rhs: Self) -> Self;
    fn wrapping_sub(self, rhs: Self) -> Self;
    fn mul(self, rhs: Self) -> Self;
    fn as_f64(self) -> f64;
    fn from_f64(input: f64) -> Self;
    fn from_f32(input: f32) -> Self;
}
Expand description

Used to make the floating origin plugin generic over many grid sizes.

Larger grids result in a larger useable volume, at the cost of increased memory usage. In addition, some platforms may be unable to use larger numeric types (e.g. i128).

Required Associated Constants§

The zero value for this type.

The value of 1 for this type.

Required Methods§

Adds rhs to self, wrapping when overflow would occur.

Subtracts rhs from self, wrapping when overflow would occur.

Multiplies self by rhs.

Casts self as a double precision float.

Casts a double precision float into Self.

Casts a single precision float into Self.

Implementations on Foreign Types§

Implementors§