Trait vizia::vg::Scalar

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

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

Required Associated Constants§

const ZERO: Self

const NEARLY_ZERO: Self

const ONE: Self

const HALF: Self

Required Methods§

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

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl Scalar for f32

§

const ZERO: f32 = 0f32

§

const NEARLY_ZERO: f32 = 2.44140625E-4f32

§

const ONE: f32 = 1f32

§

const HALF: f32 = 0.5f32

§

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

§

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

Implementors§