Truncation and round off

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Truncation and round off

Jerome Peace
Hi Andreas and Nicolas,

In the bug report, I mentioned that using trucation
(as opposed to floor ) had problems and pointed out
that with the present implementation (where trucation
is done separately for origin and corner) you could
not count on

aRectangle truncated extent = aRectangle extent
to always be true. I meant that as a dramatization of
the problem not its sole difficulty.

Andreas method could make that true but the truncation
of the origin would still cause the bounds to jitter
as quadrents are crossed. So it would not represent a
complete solution to the truncation and rounding

Yours in service, --Jerome Peace

>Truncation and round off
>Andreas Raab andreas.raab at
>Sun Feb 5 21:22:25 CET 2006 wrote:
>nicolas cellier wrote:
>> Putting a constraint like:
>>  aRectangle truncated extent = aRectangle extent
>> whatever the coordinate transform is does not sound
easy: maths say it is
>> simply impossible even without a rotation (unless
rectangle sides are 3*n and
>> 4*n).
>Huh? And why would that be? The correct solution for
that sort of
>truncation is obviously:
>   ^Rectangle origin: self origin truncated extent:
self extent truncated
>I see nothing that suggests there would be any
Well, at the speed at which you program I would
imagine most fenceposts appear as blurs anyway. ;-p
>   - Andreas

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around