aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/deco.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/deco.c')
-rw-r--r--src/deco.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/deco.c b/src/deco.c
index dca164f..7a7b736 100644
--- a/src/deco.c
+++ b/src/deco.c
@@ -121,12 +121,8 @@ gas_t gas_new(unsigned char o2, unsigned char he, double mod)
{
assert(o2 + he <= 100);
- if (mod == MOD_AUTO) {
- double mod_po2 = PO2_MAX / (o2 / 100.0);
- double mod_end = END_MAX / (1 - he / 100.0);
-
- mod = min(mod_po2, mod_end);
- }
+ if (mod == MOD_AUTO)
+ mod = PO2_MAX / (o2 / 100.0);
return (gas_t){.o2 = o2, .he = he, .n2 = 100 - o2 - he, .mod = mod};
}