Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Dmitry. A. Ashkadov wrote:
I found out that class Rectangle contains two different finctions
getWidth() and GetWidth(). The first returns wrong value.

Hi Dmitry - yes, the two different methods are surely confusing. As
for the "wrong value", that very much depends on the mental model of
rectangles you're using. In a discrete geometry world (aka "pixel"),
the GetWidth() is correct. In a continuous geometry world (aka
"euclidean plane"), getWidth() is right.

This fundamental, conceptual difference is the historical reason for
the two methods (admittedly, not a very clean solution to the
problem).

Cheers,

-- Thorsten

Attachment: pgpYgTeN26tPk.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.