Closed stephengold closed 1 year ago
The hash functions are modeled after Quatd
and Vec4d
. They're not ideal, since swapping any 2 elements other than m00
results in an identical code. Instead of multiplying by 13L
or 19L
each time, perhaps there should be a different coefficient for each element? I'm open to suggestions...
I think it's better now ... ready for review and integration!
Because
Matrix3d
andMatrix4d
do not overrideequals()
, comparisons between matrices can give unexpectedfalse
results.Once we override
equals()
, we should also overridehashCode()
so that invokinghashCode()
on equal objects will always produce equal results.For consistency with JMonkeyEngine's
Matrix3f
andMatrix4f
, these implementations distinguish0.
from-0.