[cairo] Transform+Repeat patch for libpixman

Bill Spitzak spitzak at d2.com
Tue Oct 12 12:03:08 PDT 2004


On Tuesday 12 October 2004 11:37 am, Keith Packard wrote:
> It would, however be nice to get the right answer in all cases.  I think
> that's as simple as:
>
>         ((b) - (-a - 1) % b) - 1

Just tried that and it works. And like you said both sides of the modulus are 
always positive (or 0 for the left side) and thus it avoids all unknown parts 
of how % works on different machines.




More information about the cairo mailing list