I need to calculate the absolute value of the difference of two double values โโand get the result of double . Instead, I get int .
If the result of the subtraction is already double, why abs does not use the signature double abs (double x); ? Indeed, how can he return the whole? Most importantly, how to make it return a double ?
If that matters, a and b are actually myData.m_lat and otherData.latitude() .
source share