From ae7574483edbf569cbbf7d9cf7bc01720b8f69c9 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 14 Sep 2022 18:30:12 +0200 Subject: [PATCH] slr:: formula_exp now returns 0 for vel==0 instead of nan --- nonisotropic.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nonisotropic.cpp b/nonisotropic.cpp index a72e6d1e..214693e3 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -2261,7 +2261,9 @@ EX namespace rots { EX hyperpoint formula_exp(hyperpoint vel) { 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);