Trait cosmic::iced_winit::graphics::geometry::path::lyon_path::geom::Scalar

source ·
pub trait Scalar:
    Sized
    + Float
    + NumCast
    + FloatConst
    + 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: f32 = 0.5f32

source§

const ZERO: f32 = 0f32

source§

const ONE: f32 = 1f32

source§

const TWO: f32 = 2f32

source§

const THREE: f32 = 3f32

source§

const FOUR: f32 = 4f32

source§

const FIVE: f32 = 5f32

source§

const SIX: f32 = 6f32

source§

const SEVEN: f32 = 7f32

source§

const EIGHT: f32 = 8f32

source§

const NINE: f32 = 9f32

source§

const TEN: f32 = 10f32

source§

const MIN: f32 = -3.40282347E+38f32

source§

const MAX: f32 = 3.40282347E+38f32

source§

const EPSILON: f32 = 9.99999974E-5f32

source§

fn epsilon_for(reference: f32) -> f32

source§

fn value(v: f32) -> f32

source§

impl Scalar for f64

source§

const HALF: f64 = 0.5f64

source§

const ZERO: f64 = 0f64

source§

const ONE: f64 = 1f64

source§

const TWO: f64 = 2f64

source§

const THREE: f64 = 3f64

source§

const FOUR: f64 = 4f64

source§

const FIVE: f64 = 5f64

source§

const SIX: f64 = 6f64

source§

const SEVEN: f64 = 7f64

source§

const EIGHT: f64 = 8f64

source§

const NINE: f64 = 9f64

source§

const TEN: f64 = 10f64

source§

const MIN: f64 = -1.7976931348623157E+308f64

source§

const MAX: f64 = 1.7976931348623157E+308f64

source§

const EPSILON: f64 = 1.0E-8f64

source§

fn epsilon_for(reference: f64) -> f64

source§

fn value(v: f32) -> f64

Implementors§