Open hypcos opened 5 months ago
This is caused by incorrect handling of negative mag
in sqrt
:
https://github.com/Patashu/break_eternity.js/blob/96901974c175cb28f66c7164a5a205cdda783872/break_eternity.js#L2157-L2158
When layer
is 1 and mag
is negative, the sqrt
function tries to take the logarithm of a negative number, which is NaN.
I expected that
X.sqrt()
should give similar result toX.pow(0.5)
, but it doesn't. Especially when thelayer
is 1. Example: