Skip to main content

SpringValue

Trait SpringValue 

Source
pub trait SpringValue: ExpressionVariantValue {
    const COMPONENTS: usize;

    // Required methods
    fn to_components(self) -> [f64; 3];
    fn from_components(components: [f64; 3]) -> Self;
}
Expand description

A value a spring animation moves: its components move independently, each on the same spring.

Required Associated Constants§

Source

const COMPONENTS: usize

The number of components (1 to 3).

Required Methods§

Source

fn to_components(self) -> [f64; 3]

The components, unused ones zero.

Source

fn from_components(components: [f64; 3]) -> Self

The value with the given components.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SpringValue for f32

Source§

const COMPONENTS: usize = 1

Source§

fn to_components(self) -> [f64; 3]

Source§

fn from_components(components: [f64; 3]) -> f32

Implementors§