Divr

From EDukeWiki
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).