|
Boost : |
From: Suto, Gyuszi (gyuszi.suto_at_[hidden])
Date: 2007-10-03 18:49:46
Michael Marcin wrote:
> Suto, Gyuszi wrote:
>>
>> The biggest issue is agreeing on fixed vs. floating precision.
>>
>
> If it's going to be a template library why not both?
>
> I personally need fixed-point but I can easily see situations where
> using floating-point would be beneficial.
The floating point has high resolution near zero and very low resolution
at high values. My worry is that once you start moving, creating,
intersecting
shapes/lines at high values, you may not have a floating point value
available for that coordinate. Then you snap to nearest, in which case
your parallels are not parallel any more, your collinears are not
collinear any more, etc. There are many problems with floating points.
Maybe infinite precision, maybe rational numbers will work. I'm sure
some of the readers of this thread have more experience with that
regards
Gyuszi
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk