Trait skia_safe::Scalar

source ·
pub trait Scalar: Copy {
    const ZERO: Self;
    const NEARLY_ZERO: Self;
    const ONE: Self;
    const HALF: Self;

    // Required methods
    fn nearly_equal(
        x: scalar,
        y: scalar,
        tolerance: impl Into<Option<scalar>>
    ) -> bool;
    fn nearly_zero(&self, tolerance: impl Into<Option<scalar>>) -> bool;
}

Required Associated Constants§

source

const ZERO: Self

source

const NEARLY_ZERO: Self

source

const ONE: Self

source

const HALF: Self

Required Methods§

source

fn nearly_equal( x: scalar, y: scalar, tolerance: impl Into<Option<scalar>> ) -> bool

source

fn nearly_zero(&self, tolerance: impl Into<Option<scalar>>) -> bool

Implementors§

source§

impl Scalar for scalar

source§

const ZERO: Self = 0f32

source§

const NEARLY_ZERO: Self = 2.44140625E-4f32

source§

const ONE: Self = 1f32

source§

const HALF: Self = 0.5f32