AP_Math: remove normalization of random compass Vector3f

This commit is contained in:
Peter Barker
2022-11-17 15:13:34 +11:00
committed by Peter Barker
parent 406119ed41
commit fffad18324
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -348,17 +348,14 @@ float rand_float(void)
#endif
}
// generate a random Vector3f with each value between -1.0 and 1.0
Vector3f rand_vec3f(void)
{
Vector3f v {
return Vector3f{
rand_float(),
rand_float(),
rand_float()
};
if (!v.is_zero()) {
v.normalize();
}
return v;
}
#endif