Basic lerp function
This commit is contained in:
parent
4b50993773
commit
e061866cf4
|
@ -129,3 +129,8 @@ async fn set_servo_position(state: State) {
|
|||
// I2C control board manages servos
|
||||
info!("Setting position to {}", state.servo_positions());
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn lerp(v0: f32, v1: f32, t: f32) -> f32 {
|
||||
return (1. - t) * v0 + t * v1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue