no divide by zero

This commit is contained in:
Zynh Ludwig 2024-09-03 16:05:42 -07:00
parent 62ad660c08
commit 56cfd97d77

View file

@ -103,7 +103,9 @@ fn alignment(
count += 1;
}
accel.0 /= count as f32;
if count > 0 {
accel.0 /= count as f32;
}
});
}