When does round(0.0)=NaN?

Ran into this earlier and can’t figure out how round(0.0) returns NaN.

I have a structure, pnt{x as double, y as double}
2 lines
somehow I end up with {NaN,0}

I changed the code to assign to an integer as the rounding step, but I’d like to understand what might cause this… any ideas?

Perhaps try testing to see that pnt.x and pnt.y actually have values, or set them to a default value of 0.0?

They show as 0 in the debugger. I’m wondering if there’s something strange in the calculations that arrive at zero… other values have no issue. and zero only has trouble in the x calculation…

32-Bit or 64-Bit?