Location Lib : Abs was overflowing causing bad comparison

This commit is contained in:
Jason Short 2012-08-15 22:01:51 -07:00
parent 4d5d16720b
commit a66e43aff1
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ static float longitude_scale(const struct Location *loc)
{
static int32_t last_lat;
static float scale = 1.0;
if (abs(last_lat - loc->lat) < 100000) {
if (labs(last_lat - loc->lat) < 100000) {
// we are within 0.01 degrees (about 1km) of the
// same latitude. We can avoid the cos() and return
// the same scale factor.