AP_Math: eliminate SITL float-equals issues

This commit is contained in:
Peter Barker 2018-08-15 12:36:10 +10:00 committed by Peter Barker
parent 04c36efdbf
commit 8fee27937a

View File

@ -232,7 +232,7 @@ Vector3f rand_vec3f(void)
Vector3f v = Vector3f(rand_float(),
rand_float(),
rand_float());
if (v.length() != 0.0f) {
if (!is_zero(v.length())) {
v.normalize();
}
return v;