]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
Make division by 0 return NAN when output is a floating point type, not 0.
authorRudolf Polzer <divVerent@gmail.com>
Sun, 5 Jan 2025 01:33:14 +0000 (20:33 -0500)
committerdivVerent <divVerent@gmail.com>
Tue, 4 Feb 2025 21:08:11 +0000 (16:08 -0500)
commit4bbbf370a1b7bc8d5edf3f9eef77488afee0600f
tree1a316f6db6041c37dd7f5c4b6c6adfdfa8767a34
parent5da14eaaf56d237d6a2999ebb3c3bfa7a2207d74
Make division by 0 return NAN when output is a floating point type, not 0.

For now the division by zero warning is kept.

The old behavior is behind a cvar `prvm_gameplayfix_div0is0` to enable in
case this causes any trouble for anyone.

Fixed #240.
prvm_edict.c
prvm_exec.c
prvm_execprogram.h