mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AP_Math: eliminate SITL float-equals issues
This commit is contained in:
committed by
Peter Barker
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;
|
||||
|
||||
Reference in New Issue
Block a user