Type Alias style::values::computed::ratio::Ratio

source ·
pub type Ratio = Ratio<NonNegativeNumber>;
Expand description

A computed value.

Aliased Type§

struct Ratio(pub NonNegative<f32>, pub NonNegative<f32>);

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