[−][src]Trait vek::ops::Lerp
A value that can be linearly interpolated.
Note that, like standard operators, this can be implement for T
and &T
.
You would make the difference like so:
use vek::ops::Lerp; let a = Lerp::lerp(0, 10, 0.5_f32); let b = Lerp::lerp(&0, &10, 0.5_f32); let c = i32::lerp(0, 10, 0.5_f32); let d = <&i32>::lerp(&0, &10, 0.5_f32); assert_eq!(a, b); assert_eq!(a, c); assert_eq!(a, d);
This is made possible thanks to the explicit Output
type.
Therefore, it's also convenient for GameState
structures, which you might
prefer to interpolate by reference instead of consuming them.
The interpolation of two &GameState
s would produce a new GameState
value.
use vek::{Lerp, Vec3}; /// A data-heavy structure that represents a current game state. /// It's neither Copy and nor even Clone! struct GameState { pub camera_position: Vec3<f32>, // ... obviously a lot of other members following ... } // We can select the Progress type. I chose f64; the default is f32. impl<'a> Lerp<f64> for &'a GameState { type Output = GameState; fn lerp_unclamped(a: Self, b: Self, t: f64) -> GameState { GameState { camera_position: Lerp::lerp(a.camera_position, b.camera_position, t as f32), // ... etc for all relevant members... } } } let a = GameState { camera_position: Vec3::zero() }; let b = GameState { camera_position: Vec3::unit_x() }; let c = Lerp::lerp(&a, &b, 0.5); // Hurray! We've got an interpolated state without consuming the two previous ones.
Associated Types
type Output
The resulting type after performing the LERP operation.
Required methods
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output
Returns the linear interpolation of from
to to
with factor
unconstrained,
using the supposedly fastest but less precise implementation.
This would make use of inclusive ranges, but they aren't stable yet.
A possible implementation is from + factor * (to - from)
, a.k.a
factor.mul_add(to - from, from)
.
use vek::ops::Lerp; assert_eq!(Lerp::lerp_unclamped(10, 20, -1.0_f32), 0); assert_eq!(Lerp::lerp_unclamped(10, 20, -0.5_f32), 5); assert_eq!(Lerp::lerp_unclamped(10, 20, 0.0_f32), 10); assert_eq!(Lerp::lerp_unclamped(10, 20, 0.5_f32), 15); assert_eq!(Lerp::lerp_unclamped(10, 20, 1.0_f32), 20); assert_eq!(Lerp::lerp_unclamped(10, 20, 1.5_f32), 25);
Provided methods
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self::Output
Returns the linear interpolation of from
to to
with factor
unconstrained,
using a possibly slower but more precise operation.
This would make use of inclusive ranges, but they aren't stable yet.
A possible implementation is from*(1-factor) + to*factor
, a.k.a
from.mul_add(1-factor, to*factor)
.
use vek::ops::Lerp; assert_eq!(Lerp::lerp_unclamped_precise(10, 20, -1.0_f32), 0); assert_eq!(Lerp::lerp_unclamped_precise(10, 20, -0.5_f32), 5); assert_eq!(Lerp::lerp_unclamped_precise(10, 20, 0.0_f32), 10); assert_eq!(Lerp::lerp_unclamped_precise(10, 20, 0.5_f32), 15); assert_eq!(Lerp::lerp_unclamped_precise(10, 20, 1.0_f32), 20); assert_eq!(Lerp::lerp_unclamped_precise(10, 20, 1.5_f32), 25);
fn lerp(from: Self, to: Self, factor: Factor) -> Self::Output where
Factor: Clamp + Zero + One,
Factor: Clamp + Zero + One,
Alias to lerp_unclamped
which constrains factor
to be between 0 and 1
(inclusive).
use vek::ops::Lerp; assert_eq!(Lerp::lerp(10, 20, -1.0_f32), 10); assert_eq!(Lerp::lerp(10, 20, -0.5_f32), 10); assert_eq!(Lerp::lerp(10, 20, 0.0_f32), 10); assert_eq!(Lerp::lerp(10, 20, 0.5_f32), 15); assert_eq!(Lerp::lerp(10, 20, 1.0_f32), 20); assert_eq!(Lerp::lerp(10, 20, 1.5_f32), 20);
fn lerp_precise(from: Self, to: Self, factor: Factor) -> Self::Output where
Factor: Clamp + Zero + One,
Factor: Clamp + Zero + One,
Alias to lerp_unclamped_precise
which constrains factor
to be between 0 and 1
(inclusive).
use vek::ops::Lerp; assert_eq!(Lerp::lerp_precise(10, 20, -1.0_f32), 10); assert_eq!(Lerp::lerp_precise(10, 20, -0.5_f32), 10); assert_eq!(Lerp::lerp_precise(10, 20, 0.0_f32), 10); assert_eq!(Lerp::lerp_precise(10, 20, 0.5_f32), 15); assert_eq!(Lerp::lerp_precise(10, 20, 1.0_f32), 20); assert_eq!(Lerp::lerp_precise(10, 20, 1.5_f32), 20);
Implementations on Foreign Types
impl Lerp<f32> for f32
[src]
type Output = f32
fn lerp_unclamped_precise(from: Self, to: Self, factor: Self) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Self) -> Self
[src]
impl<'a> Lerp<f32> for &'a f32
[src]
type Output = f32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> f32
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> f32
[src]
impl Lerp<f64> for f64
[src]
type Output = f64
fn lerp_unclamped_precise(from: Self, to: Self, factor: Self) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Self) -> Self
[src]
impl<'a> Lerp<f64> for &'a f64
[src]
type Output = f64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> f64
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> f64
[src]
impl Lerp<f32> for i8
[src]
type Output = i8
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for i8
[src]
type Output = i8
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a i8
[src]
type Output = i8
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> i8
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> i8
[src]
impl<'a> Lerp<f64> for &'a i8
[src]
type Output = i8
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> i8
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> i8
[src]
impl Lerp<f32> for i16
[src]
type Output = i16
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for i16
[src]
type Output = i16
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a i16
[src]
type Output = i16
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> i16
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> i16
[src]
impl<'a> Lerp<f64> for &'a i16
[src]
type Output = i16
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> i16
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> i16
[src]
impl Lerp<f32> for i32
[src]
type Output = i32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for i32
[src]
type Output = i32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a i32
[src]
type Output = i32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> i32
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> i32
[src]
impl<'a> Lerp<f64> for &'a i32
[src]
type Output = i32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> i32
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> i32
[src]
impl Lerp<f32> for i64
[src]
type Output = i64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for i64
[src]
type Output = i64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a i64
[src]
type Output = i64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> i64
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> i64
[src]
impl<'a> Lerp<f64> for &'a i64
[src]
type Output = i64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> i64
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> i64
[src]
impl Lerp<f32> for isize
[src]
type Output = isize
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for isize
[src]
type Output = isize
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a isize
[src]
type Output = isize
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> isize
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> isize
[src]
impl<'a> Lerp<f64> for &'a isize
[src]
type Output = isize
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> isize
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> isize
[src]
impl Lerp<f32> for u8
[src]
type Output = u8
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for u8
[src]
type Output = u8
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a u8
[src]
type Output = u8
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> u8
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> u8
[src]
impl<'a> Lerp<f64> for &'a u8
[src]
type Output = u8
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> u8
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> u8
[src]
impl Lerp<f32> for u16
[src]
type Output = u16
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for u16
[src]
type Output = u16
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a u16
[src]
type Output = u16
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> u16
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> u16
[src]
impl<'a> Lerp<f64> for &'a u16
[src]
type Output = u16
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> u16
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> u16
[src]
impl Lerp<f32> for u32
[src]
type Output = u32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for u32
[src]
type Output = u32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a u32
[src]
type Output = u32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> u32
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> u32
[src]
impl<'a> Lerp<f64> for &'a u32
[src]
type Output = u32
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> u32
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> u32
[src]
impl Lerp<f32> for u64
[src]
type Output = u64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for u64
[src]
type Output = u64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a u64
[src]
type Output = u64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> u64
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> u64
[src]
impl<'a> Lerp<f64> for &'a u64
[src]
type Output = u64
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> u64
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> u64
[src]
impl Lerp<f32> for usize
[src]
type Output = usize
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> Self
[src]
impl Lerp<f64> for usize
[src]
type Output = usize
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> Self
[src]
impl<'a> Lerp<f32> for &'a usize
[src]
type Output = usize
fn lerp_unclamped_precise(from: Self, to: Self, factor: f32) -> usize
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f32) -> usize
[src]
impl<'a> Lerp<f64> for &'a usize
[src]
type Output = usize
fn lerp_unclamped_precise(from: Self, to: Self, factor: f64) -> usize
[src]
fn lerp_unclamped(from: Self, to: Self, factor: f64) -> usize
[src]
Implementors
impl<'a, P, O, S, Factor> Lerp<Factor> for &'a vek::transform::repr_c::Transform<P, O, S> where
Factor: Copy + Into<O>,
&'a P: Lerp<Factor, Output = P>,
&'a S: Lerp<Factor, Output = S>,
O: Lerp<O, Output = O> + Real + Sum,
[src]
Factor: Copy + Into<O>,
&'a P: Lerp<Factor, Output = P>,
&'a S: Lerp<Factor, Output = S>,
O: Lerp<O, Output = O> + Real + Sum,
LERP on a Transform
is defined as LERP-ing between the positions and scales,
and performing SLERP between the orientations.
type Output = Transform<P, O, S>
fn lerp_unclamped(a: Self, b: Self, t: Factor) -> Self::Output
[src]
fn lerp_unclamped_precise(a: Self, b: Self, t: Factor) -> Self::Output
[src]
impl<'a, P, O, S, Factor> Lerp<Factor> for &'a vek::transform::repr_simd::Transform<P, O, S> where
Factor: Copy + Into<O>,
&'a P: Lerp<Factor, Output = P>,
&'a S: Lerp<Factor, Output = S>,
O: Lerp<O, Output = O> + Real + Sum,
[src]
Factor: Copy + Into<O>,
&'a P: Lerp<Factor, Output = P>,
&'a S: Lerp<Factor, Output = S>,
O: Lerp<O, Output = O> + Real + Sum,
LERP on a Transform
is defined as LERP-ing between the positions and scales,
and performing SLERP between the orientations.
type Output = Transform<P, O, S>
fn lerp_unclamped(a: Self, b: Self, t: Factor) -> Self::Output
[src]
fn lerp_unclamped_precise(a: Self, b: Self, t: Factor) -> Self::Output
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::quaternion::repr_c::Quaternion<T> where
T: Lerp<Factor, Output = T> + Sum + Real,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T> + Sum + Real,
Factor: Copy,
The Lerp
implementation for quaternion is the "Normalized LERP".
type Output = Quaternion<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Quaternion<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Quaternion<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::quaternion::repr_simd::Quaternion<T> where
T: Lerp<Factor, Output = T> + Sum + Real,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T> + Sum + Real,
Factor: Copy,
The Lerp
implementation for quaternion is the "Normalized LERP".
type Output = Quaternion<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Quaternion<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Quaternion<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_c::extent2::Extent2<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Extent2<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Extent2<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Extent2<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_c::extent3::Extent3<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Extent3<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Extent3<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Extent3<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_c::rgb::Rgb<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Rgb<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Rgb<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Rgb<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_c::rgba::Rgba<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Rgba<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Rgba<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Rgba<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_c::vec2::Vec2<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Vec2<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Vec2<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Vec2<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_c::vec3::Vec3<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Vec3<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Vec3<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Vec3<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_c::vec4::Vec4<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Vec4<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Vec4<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Vec4<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_simd::extent2::Extent2<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Extent2<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Extent2<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Extent2<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_simd::extent3::Extent3<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Extent3<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Extent3<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Extent3<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_simd::rgb::Rgb<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Rgb<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Rgb<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Rgb<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_simd::rgba::Rgba<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Rgba<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Rgba<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Rgba<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_simd::vec2::Vec2<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Vec2<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Vec2<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Vec2<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_simd::vec3::Vec3<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Vec3<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Vec3<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Vec3<T>
[src]
impl<'a, T, Factor> Lerp<Factor> for &'a vek::vec::repr_simd::vec4::Vec4<T> where
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
&'a T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Vec4<T>
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Vec4<T>
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Vec4<T>
[src]
impl<P, O, S, Factor> Lerp<Factor> for vek::transform::repr_c::Transform<P, O, S> where
Factor: Copy + Into<O>,
P: Lerp<Factor, Output = P>,
S: Lerp<Factor, Output = S>,
O: Lerp<O, Output = O> + Real + Sum,
[src]
Factor: Copy + Into<O>,
P: Lerp<Factor, Output = P>,
S: Lerp<Factor, Output = S>,
O: Lerp<O, Output = O> + Real + Sum,
LERP on a Transform
is defined as LERP-ing between the positions and scales,
and performing SLERP between the orientations.
type Output = Self
fn lerp_unclamped(a: Self, b: Self, t: Factor) -> Self
[src]
fn lerp_unclamped_precise(a: Self, b: Self, t: Factor) -> Self
[src]
impl<P, O, S, Factor> Lerp<Factor> for vek::transform::repr_simd::Transform<P, O, S> where
Factor: Copy + Into<O>,
P: Lerp<Factor, Output = P>,
S: Lerp<Factor, Output = S>,
O: Lerp<O, Output = O> + Real + Sum,
[src]
Factor: Copy + Into<O>,
P: Lerp<Factor, Output = P>,
S: Lerp<Factor, Output = S>,
O: Lerp<O, Output = O> + Real + Sum,
LERP on a Transform
is defined as LERP-ing between the positions and scales,
and performing SLERP between the orientations.
type Output = Self
fn lerp_unclamped(a: Self, b: Self, t: Factor) -> Self
[src]
fn lerp_unclamped_precise(a: Self, b: Self, t: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::quaternion::repr_c::Quaternion<T> where
T: Lerp<Factor, Output = T> + Sum + Real,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T> + Sum + Real,
Factor: Copy,
The Lerp
implementation for quaternion is the "Normalized LERP".
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::quaternion::repr_simd::Quaternion<T> where
T: Lerp<Factor, Output = T> + Sum + Real,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T> + Sum + Real,
Factor: Copy,
The Lerp
implementation for quaternion is the "Normalized LERP".
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_c::extent2::Extent2<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_c::extent3::Extent3<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_c::rgb::Rgb<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_c::rgba::Rgba<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_c::vec2::Vec2<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_c::vec3::Vec3<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_c::vec4::Vec4<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_simd::extent2::Extent2<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_simd::extent3::Extent3<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_simd::rgb::Rgb<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_simd::rgba::Rgba<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_simd::vec2::Vec2<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_simd::vec3::Vec3<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,
type Output = Self
fn lerp_unclamped_precise(from: Self, to: Self, factor: Factor) -> Self
[src]
fn lerp_unclamped(from: Self, to: Self, factor: Factor) -> Self
[src]
impl<T, Factor> Lerp<Factor> for vek::vec::repr_simd::vec4::Vec4<T> where
T: Lerp<Factor, Output = T>,
Factor: Copy,
[src]
T: Lerp<Factor, Output = T>,
Factor: Copy,