On Thu, 09 Jul 2015 23:35:00 +0000, Vladimir Panteleev wrote:

> On Tuesday, 7 July 2015 at 03:39:00 UTC, Rikki Cattermole wrote:
>> I've been sold on the unsigned vs signed type issue for and only for
>> the x and y coordinates.
> 
> The first version of ae.utils.graphics had unsigned coordinates. As I
> found out, this was a mistake.
> 
> A rule of thumb I discovered is that any numbers you may want to
> subtract, you should use signed types. Otherwise, operations such as
> drawing an arc with its center point off-canvas (with negative
> coordinates) becomes unreasonably complicated.

giving that `int` and `uint` are freely interchangeable... `uint` is 
better, as it allows only one bound check in `if`, and without casts. ;-)

Attachment: signature.asc
Description: PGP signature

Reply via email to