AP_Math: Speed up location calculations slightly

This commit is contained in:
Michael du Breuil 2018-09-18 02:06:30 -07:00 committed by Andrew Tridgell
parent 8ac38d73f7
commit 9cd1be1d6f

View File

@ -26,7 +26,7 @@
float longitude_scale(const struct Location &loc)
{
float scale = cosf(loc.lat * 1.0e-7f * DEG_TO_RAD);
float scale = cosf(loc.lat * (1.0e-7f * DEG_TO_RAD));
return constrain_float(scale, 0.01f, 1.0f);
}