Type Alias Ratio

Source
pub type Ratio = Ratio<NonNegativeNumber>;
Expand description

A computed value.

Aliased Type§

#[repr(C)]
pub struct Ratio(pub NonNegative<f32>, pub NonNegative<f32>);

Tuple Fields§

§0: NonNegative<f32>§1: NonNegative<f32>

Implementations§

Source§

impl Ratio

Source

pub fn new(a: f32, b: f32) -> Self

Returns a new Ratio.

Trait Implementations§

Source§

impl PartialOrd for Ratio

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more