raze/source/duke3d
hendricks266 e1e5e338dc New commands: "divr", "divru", "divrd"
divr <dividend> <divisor>

Divide gamevar <dividend> by <divisor> and round (aka round to nearest) the result. A result of 0.5 will equal 1.

divru <dividend> <divisor>

Divide gamevar <dividend> by <divisor> and round up (aka round away from zero) the result.

Additionally "divrd" can be used to round down (aka round toward zero), which is equivalent to the current div command as tested on x86, ARM, and PowerPC.

Note that "shiftr" rounds up negative values.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6611 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-29 02:14:04 +00:00
..
rsrc Route inclusion of all Windows headers through a new header, windows_inc.h. 2017-02-19 22:15:44 +00:00
src New commands: "divr", "divru", "divrd" 2018-01-29 02:14:04 +00:00
Dependencies.mak Fix gcc 7.1.0 warnings 2017-07-18 20:53:41 +00:00
gpl-2.0.txt The great repository rearrangement of 2017. 2017-02-01 10:01:11 +00:00