Type Alias style::values::computed::ZeroToOneNumber

source ·
pub type ZeroToOneNumber = ZeroToOne<CSSFloat>;
Expand description

A wrapper of Number, but the value between 0 and 1

Aliased Type§

struct ZeroToOneNumber(pub f32);

Fields§

§0: f32

Trait Implementations§

source§

impl From<f32> for ZeroToOneNumber

source§

fn from(number: CSSFloat) -> Self

Converts to this type from the input type.
source§

impl ToAnimatedValue for ZeroToOneNumber

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.