Trait lyon_geom::Scalar

source ·
pub trait Scalar: Float + NumCast + FloatConst + Sized + Display + Debug + Trig + AddAssign + SubAssign + MulAssign + DivAssign {
Show 16 associated constants and 2 methods const HALF: Self; const ZERO: Self; const ONE: Self; const TWO: Self; const THREE: Self; const FOUR: Self; const FIVE: Self; const SIX: Self; const SEVEN: Self; const EIGHT: Self; const NINE: Self; const TEN: Self; const MIN: Self; const MAX: Self; const EPSILON: Self; const DIV_EPSILON: Self = Self::EPSILON; // Required method fn value(v: f32) -> Self; // Provided method fn epsilon_for(_reference: Self) -> Self { ... }
}

Required Associated Constants§

source

const HALF: Self

source

const ZERO: Self

source

const ONE: Self

source

const TWO: Self

source

const THREE: Self

source

const FOUR: Self

source

const FIVE: Self

source

const SIX: Self

source

const SEVEN: Self

source

const EIGHT: Self

source

const NINE: Self

source

const TEN: Self

source

const MIN: Self

source

const MAX: Self

source

const EPSILON: Self

Provided Associated Constants§

source

const DIV_EPSILON: Self = Self::EPSILON

Required Methods§

source

fn value(v: f32) -> Self

Provided Methods§

source

fn epsilon_for(_reference: Self) -> Self

Epsilon constants are usually not a good way to deal with float precision. Float precision depends on the magnitude of the values and so should appropriate epsilons.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Scalar for f32

source§

const HALF: Self = 0.5f32

source§

const ZERO: Self = 0f32

source§

const ONE: Self = 1f32

source§

const TWO: Self = 2f32

source§

const THREE: Self = 3f32

source§

const FOUR: Self = 4f32

source§

const FIVE: Self = 5f32

source§

const SIX: Self = 6f32

source§

const SEVEN: Self = 7f32

source§

const EIGHT: Self = 8f32

source§

const NINE: Self = 9f32

source§

const TEN: Self = 10f32

source§

const MIN: Self = -3.40282347E+38f32

source§

const MAX: Self = 3.40282347E+38f32

source§

const EPSILON: Self = 9.99999974E-5f32

source§

fn epsilon_for(reference: Self) -> Self

source§

fn value(v: f32) -> Self

source§

impl Scalar for f64

source§

const HALF: Self = 0.5f64

source§

const ZERO: Self = 0f64

source§

const ONE: Self = 1f64

source§

const TWO: Self = 2f64

source§

const THREE: Self = 3f64

source§

const FOUR: Self = 4f64

source§

const FIVE: Self = 5f64

source§

const SIX: Self = 6f64

source§

const SEVEN: Self = 7f64

source§

const EIGHT: Self = 8f64

source§

const NINE: Self = 9f64

source§

const TEN: Self = 10f64

source§

const MIN: Self = -1.7976931348623157E+308f64

source§

const MAX: Self = 1.7976931348623157E+308f64

source§

const EPSILON: Self = 1.0E-8f64

source§

fn epsilon_for(reference: Self) -> Self

source§

fn value(v: f32) -> Self

Implementors§