Hex Casting

Hex Casting

6M Downloads

Dividing a vector by a number checks if the numerator is zero, not the denominator

object-Object opened this issue ยท 1 comments

commented

https://github.com/gamma-delta/HexMod/blob/a3b62c4ab8a653217ac5f1ea0607e7aa23e0f8b5/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDivCross.kt#L35

Pretty sure this line should be checking if rnum == 0. The current code results in a mishap if dividing the zero vector by a nonzero number (result should be the zero vector), and no mishap if dividing a vector by zero (should mishap).

Discovered by Kristi Fristi on Discord.

commented

fixed in the transition to Arithmetics.