sycamore::motion

Trait Lerp

source
pub trait Lerp {
    // Required method
    fn lerp(&self, other: &Self, scalar: f32) -> Self;
}
Expand description

Describes a trait that can be linearly interpolate between two points.

Required Methods§

source

fn lerp(&self, other: &Self, scalar: f32) -> Self

Get a value between cx and other at a scalar.

0.0 <= scalar <= 1

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

source§

impl Lerp for f32

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for f64

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for i8

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for i16

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for i32

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for i64

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for i128

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for isize

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for u8

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for u16

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for u32

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for u64

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for u128

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl Lerp for usize

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

source§

impl<T: Lerp + Clone, const N: usize> Lerp for [T; N]

source§

fn lerp(&self, other: &Self, scalar: f32) -> Self

Implementors§