Divr

From EDukeWiki
Revision as of 06:02, 20 February 2020 by Fox (talk | contribs) (Created page with "'''divr''' <dividend> <divisor> '''divru''' <dividend> <divisor> '''divrd''' <dividend> <divisor> Can be used to round the values of a division. '''divr''' divides the valu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

divr <dividend> <divisor>

divru <dividend> <divisor>

divrd <dividend> <divisor>

Can be used to round the values of a division. divr divides the value of a gamevar and rounds it (0.5 equals 1). divru rounds up (aka away from zero). divrd rounds down (aka towards from zero).

divrd is identical to div.

For reference, shiftr rounds down positive values and rounds up negative values (aka towards infinite negativity).