I was looking at the Math
sources in the Android Framework and here is what the round()
method looks like :
public static int round(float f) {
// check for NaN
if (f != f) {
return 0;
}
return (int) floor(f + 0.5f);
}
I'm trying to wrap my head around what the first check does without success. How could f be different from itself ? I also can't think of any test case that would make this any different... Any idea ?