store zero strain values

This commit is contained in:
MaxOhn
2023-02-10 18:52:43 +01:00
parent b1451b4f0b
commit b5439a0229
5 changed files with 16 additions and 13 deletions
+3 -3
View File
@@ -55,9 +55,9 @@ pub(crate) trait StrainSkill: Skill + Sized {
if self.curr_section_peak().abs() <= f64::EPSILON
&& curr.start_time > *self.curr_section_end()
{
let remaining = curr.start_time - *self.curr_section_end();
let skip_iter_count = (remaining / SECTION_LEN).ceil();
*self.curr_section_end() += skip_iter_count * SECTION_LEN;
let remaining_time = curr.start_time - *self.curr_section_end();
let remaining_iters = (remaining_time / SECTION_LEN).ceil();
*self.curr_section_end() += remaining_iters * SECTION_LEN;
}
}