Skip to content

Commit

Permalink
Switched condition in saturation
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkapok committed Nov 28, 2024
1 parent 0103d8c commit df03299
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/scuba-physics/src/lib/Tissues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit df03299

Please sign in to comment.