summaryrefslogtreecommitdiffstats
path: root/deco.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-08-21 17:22:07 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-21 09:28:04 -0700
commit652f7e9864b5a28ba03bdaa641139230364dae0e (patch)
tree1154a084e10bd94374b3835fade22e7902b3c9a3 /deco.c
parentd9b4f2b7e36d8891a34b8049eca8008c89382e2f (diff)
downloadsubsurface-652f7e9864b5a28ba03bdaa641139230364dae0e.tar.gz
Don't do computationally expensive Boyle compensation when not using VPM-B
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'deco.c')
-rw-r--r--deco.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/deco.c b/deco.c
index 16089e32b..6f8f0f6d4 100644
--- a/deco.c
+++ b/deco.c
@@ -362,6 +362,9 @@ void boyles_law(double next_stop_pressure)
{
int ci;
+ if (!in_planner() || prefs.deco_mode != VPMB)
+ return;
+
// This should be a tautology but prevents a numerical instability.
if (IS_FP_SAME(next_stop_pressure, first_stop_pressure))
return;