pub type NonNegativeNumber = NonNegative<CSSFloat>;
Expand description

A wrapper of Number, but the value >= 0.

Aliased Type§

struct NonNegativeNumber(pub f32);

Fields§

§0: f32

Trait Implementations§

source§

impl From<f32> for NonNegativeNumber

source§

fn from(number: CSSFloat) -> NonNegativeNumber

Converts to this type from the input type.
source§

impl One for NonNegativeNumber

source§

fn one() -> Self

Reutrns the one value.
source§

fn is_one(&self) -> bool

Returns whether this value is one.
source§

impl ToAnimatedValue for NonNegativeNumber

§

type AnimatedValue = f32

The type of the animated value.
source§

fn to_animated_value(self) -> Self::AnimatedValue

Converts this value to an animated value.
source§

fn from_animated_value(animated: Self::AnimatedValue) -> Self

Converts back an animated value into a computed value.