Type Alias NonNegativeNumber

Source
pub type NonNegativeNumber = NonNegative<CSSFloat>;
Expand description

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

Aliased Type§

#[repr(transparent)]
pub struct NonNegativeNumber(pub f32);

Tuple 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

Source§

type AnimatedValue = f32

The type of the animated value.
Source§

fn to_animated_value(self, _: &Context<'_>) -> 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.