mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-03 12:49:17 +00:00
slr:: formula_exp now returns 0 for vel==0 instead of nan
This commit is contained in:
parent
db3d710dd4
commit
ae7574483e
@ -2263,6 +2263,8 @@ EX namespace rots {
|
|||||||
bool sp = sphere;
|
bool sp = sphere;
|
||||||
ld K = sp ? 1 : -1;
|
ld K = sp ? 1 : -1;
|
||||||
|
|
||||||
|
if(vel[0] == 0 && vel[1] == 0 && vel[2] == 0) return C0;
|
||||||
|
|
||||||
ld len = hypot_d(3, vel);
|
ld len = hypot_d(3, vel);
|
||||||
|
|
||||||
if(vel[2] < 0) len = -len;
|
if(vel[2] < 0) len = -len;
|
||||||
|
Loading…
Reference in New Issue
Block a user