From df032993767d8918a52f36743f5a375e6aea1151 Mon Sep 17 00:00:00 2001 From: Jiri Pokorny Date: Thu, 28 Nov 2024 22:41:02 +0100 Subject: [PATCH] Switched condition in saturation --- projects/scuba-physics/src/lib/Tissues.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/scuba-physics/src/lib/Tissues.ts b/projects/scuba-physics/src/lib/Tissues.ts index 1daa4ef0..f8f6f865 100644 --- a/projects/scuba-physics/src/lib/Tissues.ts +++ b/projects/scuba-physics/src/lib/Tissues.ts @@ -271,11 +271,11 @@ export class Tissues { // We need use Gradient here, since we want to show the saturation aligned with profile and ceilings. // Or should the heat map change when changing gradient factors? return _(this._compartments).map(t => { - if(t.pTotal > ambientPressure) { - return t.gradientFactor(ambientPressure); + if (t.pTotal < ambientPressure) { + return t.pTotal / ambientPressure - 1; } - return t.pTotal / ambientPressure -1; + return t.gradientFactor(ambientPressure); }).value(); }