Re: [Pyobjc-dev] NSPoint/NSMakePoint oddness
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2009-06-02 20:00:49
|
On 2 Jun, 2009, at 20:44, 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? Yes, but you're running into a limitation of the platform. The field of an NSPoint structure are C floats and a float cannot accurately represent the value 100000100, that's why you get a slighty different one. Ronald |