slr:: formula_exp now returns 0 for vel==0 instead of nan
This commit is contained in:
parent
db3d710dd4
commit
ae7574483e
|
@ -2261,7 +2261,9 @@ EX namespace rots {
|
||||||
|
|
||||||
EX hyperpoint formula_exp(hyperpoint vel) {
|
EX hyperpoint formula_exp(hyperpoint vel) {
|
||||||
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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue