Type Definition vek::transition::LinearTransition
source · [−]pub type LinearTransition<T, Progress = f32> = Transition<T, IdentityProgressMapper, Progress>;
Expand description
A convenience structure for storing a linear progression from one value to another.
Implementations
sourceimpl<T, Progress> LinearTransition<T, Progress>
impl<T, Progress> LinearTransition<T, Progress>
sourcepub fn new(start: T, end: T) -> Self where
Progress: Zero,
pub fn new(start: T, end: T) -> Self where
Progress: Zero,
Creates a new LinearTransition
from start
and end
values, setting progress
to zero.
sourcepub fn with_progress(start: T, end: T, progress: Progress) -> Self
pub fn with_progress(start: T, end: T, progress: Progress) -> Self
Creates a new LinearTransition
from start
, end
and progress
values.