]> git.lizzy.rs Git - irrlicht.git/commit
vector3d scalar operator/ and operator/= no longer multiply by the inverse but use...
authorcutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>
Thu, 3 Feb 2022 14:47:41 +0000 (14:47 +0000)
committersfan5 <sfan5@live.de>
Wed, 9 Feb 2022 18:07:05 +0000 (19:07 +0100)
commit7fb36849c7a1a6384de13206b9096945ce02bec9
tree6384520d603a6707edea0a28c6b4019c80385bf4
parent8c0ee7d9ab78714c261b500cd21639d292fdb32c
vector3d scalar operator/ and operator/= no longer multiply by the inverse but use the expected division.
That was a bad case of premature optimization.
Multiplication is indeed faster, but when working with floats this can introduce some rather unexpected inaccuracies.
Like x/x suddenly no longer being 1.0 (something guaranteed by division).
If someone really needs this back, then please add some new function which makes it clear we don't just have a typical division here.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6298 dfc29bdd-3216-0410-991c-e03cc46cb475
changes.txt
include/vector3d.h