Fix debug assertion failure in smoother
This commit is contained in:
parent
28cd25d501
commit
6f7f2e30ed
1 changed files with 5 additions and 1 deletions
|
@ -260,7 +260,11 @@ impl<T: Smoothable> Smoother<T> {
|
|||
let current = self.current.load(Ordering::Relaxed);
|
||||
let target_f32 = target.to_f32();
|
||||
self.step_size.store(
|
||||
self.style.step_size(current, target_f32, steps_left as u32),
|
||||
if steps_left > 0 {
|
||||
self.style.step_size(current, target_f32, steps_left as u32)
|
||||
} else {
|
||||
0.0
|
||||
},
|
||||
Ordering::Relaxed,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue