[squeak-dev] Rounding in MatrixTransform2x3

Ron Teitelbaum ron at usmedrec.com
Tue Jul 28 17:55:39 UTC 2020

>> On Tue, Jul 28, 2020 at 4:34 AM Stephan Lutz <dev at stlutz.net>
>>It appears the code used to round in the plugin simply adds 0.5 and
truncates the result, which does not work correctly for negative numbers.
>>This code can be found in Matrix2x3Plugin >> #roundAndStoreResultPoint:
and Matrix2x3Plugin >> #roundAndStoreResultRect:x0:y0:x1:y1: .
Rounding up for negative numbers is wrong.

  (MatrixTransform2x3 withOffset: -5 @ -10) localPointToGlobal: 0 at 0. "-4@

All the best,

Ron Teitelbaum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200728/9a867906/attachment.html>

More information about the Squeak-dev mailing list