alloy::ops

Trait Lerp

source
pub trait Lerp<Rhs: ?Sized = Self> {
    type Output;

    // Required method
    fn lerp(&self, b: &Rhs, alpha: f32) -> Self::Output;
}
Expand description

Trait for interpolating between two different states.

See Linear Interpolation for more information.

Required Associated Types§

source

type Output

The output of this operation.

Required Methods§

source

fn lerp(&self, b: &Rhs, alpha: f32) -> Self::Output

Interpolates between two different states

§Parameters
  • a - The first value.
  • b - The second value.
  • alpha - The interpolation factor.

Implementations on Foreign Types§

source§

impl Lerp for f32

source§

type Output = f32

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for f64

source§

type Output = f64

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for i8

source§

type Output = i8

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for i16

source§

type Output = i16

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for i32

source§

type Output = i32

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for i64

source§

type Output = i64

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for i128

source§

type Output = i128

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for isize

source§

type Output = isize

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for u8

source§

type Output = u8

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for u16

source§

type Output = u16

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for u32

source§

type Output = u32

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for u64

source§

type Output = u64

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for u128

source§

type Output = u128

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

source§

impl Lerp for usize

source§

type Output = usize

source§

fn lerp(&self, b: &Self, alpha: f32) -> Self

Implementors§