no divide by zero
This commit is contained in:
parent
62ad660c08
commit
56cfd97d77
1 changed files with 3 additions and 1 deletions
|
@ -103,7 +103,9 @@ fn alignment(
|
||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if count > 0 {
|
||||||
accel.0 /= count as f32;
|
accel.0 /= count as f32;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue