FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SpringEasing

    struct · ferroui-base · v0.5.0

    struct SpringEasing
    

    Eases a value using a user-defined spring formula.

    View source

    Members

    new

    fn new() -> Self
    

    Creates a spring easing with all parameters zero.

    Source

    with_values

    fn with_values(mass: f64, stiffness: f64, damping: f64, initial_velocity: f64) -> Self
    

    Creates a spring easing with the given parameters.

    Source

    mass

    fn mass(self: &Self) -> f64
    

    The spring mass.

    Source

    set_mass

    fn set_mass(self: &Self, value: f64)
    

    Source

    stiffness

    fn stiffness(self: &Self) -> f64
    

    The spring stiffness.

    Source

    set_stiffness

    fn set_stiffness(self: &Self, value: f64)
    

    Source

    damping

    fn damping(self: &Self) -> f64
    

    The spring damping.

    Source

    set_damping

    fn set_damping(self: &Self, value: f64)
    

    Source

    initial_velocity

    fn initial_velocity(self: &Self) -> f64
    

    The spring initial velocity.

    Source

    set_initial_velocity

    fn set_initial_velocity(self: &Self, value: f64)
    

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.