Trait big_space::precision::GridPrecision
source · 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§
Required Methods§
sourcefn wrapping_add(self, rhs: Self) -> Self
fn wrapping_add(self, rhs: Self) -> Self
Adds rhs to self, wrapping when overflow would occur.
sourcefn wrapping_sub(self, rhs: Self) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
Subtracts rhs from self, wrapping when overflow would occur.