mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_Math: eliminate SITL float-equals issues
This commit is contained in:
parent
04c36efdbf
commit
8fee27937a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user