mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Document % changing from remainder to modulo in 0.5.0
This commit is contained in:
@@ -356,6 +356,36 @@ because $16384$ turns = $16384 tau$ radians = $32768 pi$ radians, and $sin ( 327
|
|||||||
.EQ
|
.EQ
|
||||||
delim off
|
delim off
|
||||||
.EN
|
.EN
|
||||||
|
.Ss % operator behavior with negative dividend or divisor
|
||||||
|
Changed in 0.5.0.
|
||||||
|
.Pp
|
||||||
|
Instead of having the same sign as the dividend (a remainder operation),
|
||||||
|
.Ql %
|
||||||
|
has the same sign as the divisor (a modulo operation).
|
||||||
|
.Pp
|
||||||
|
For example, previously we had:
|
||||||
|
.Bl -bullet -offset indent
|
||||||
|
.It
|
||||||
|
.Ql 13 % 10 == 3
|
||||||
|
.It
|
||||||
|
.Ql -13 % 10 == -3
|
||||||
|
.It
|
||||||
|
.Ql 13 % -10 == 3
|
||||||
|
.It
|
||||||
|
.Ql -13 % -10 == -3
|
||||||
|
.El
|
||||||
|
.Pp
|
||||||
|
Instead, now we have:
|
||||||
|
.Bl -bullet -offset indent
|
||||||
|
.It
|
||||||
|
.Ql 13 % 10 == 3
|
||||||
|
.It
|
||||||
|
.Ql -13 % 10 == 7
|
||||||
|
.It
|
||||||
|
.Ql 13 % -10 == -7
|
||||||
|
.It
|
||||||
|
.Ql -13 % -10 == -3
|
||||||
|
.El
|
||||||
.Ss ** operator associativity
|
.Ss ** operator associativity
|
||||||
Changed in 0.9.0.
|
Changed in 0.9.0.
|
||||||
.Pp
|
.Pp
|
||||||
|
|||||||
Reference in New Issue
Block a user