Re: [Pyobjc-dev] NSPoint/NSMakePoint oddness
Brought to you by:
ronaldoussoren
From: Christopher S. <ch...@dn...> - 2009-06-02 19:45:02
|
On Jun 2, 2009, at 1:44 PM, Daniel Ashbrook wrote: > Is this expected behavior? > >>>> from Foundation import * >>>> NSMakePoint(100000100, 0) > <NSPoint x=100000096.0 y=0.0> > > Shouldn't I get out what I put in? An NSPoint is 2 floats . I'm guessing what we're seeing here is *rounding*. That is that 100000096.0 is the closest single-precision floating point value to 100000100. |