Trait cushy::animation::PercentBetween

source ·
pub trait PercentBetween {
    // Required method
    fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne;
}
Expand description

Calculates the ratio of one value against a minimum and maximum.

Required Methods§

source

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

Return the percentage that self is between min and max.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PercentBetween for bool

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for f32

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for f64

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for i8

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for i16

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for i32

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for i64

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for i128

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for isize

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for u8

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for u16

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for u32

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for u64

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for u128

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for usize

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for Fraction

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for Lp

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for Px

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

source§

impl PercentBetween for UPx

source§

fn percent_between(&self, min: &Self, max: &Self) -> ZeroToOne

Implementors§