mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Switch verify_gas_exists to take gasmix argument
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fece3f321f
commit
bd142bbee2
2 changed files with 23 additions and 27 deletions
8
dive.h
8
dive.h
|
@ -118,6 +118,14 @@ static inline bool gasmix_is_air(const struct gasmix *gasmix)
|
|||
return is_air(gasmix->o2.permille, gasmix->he.permille);
|
||||
}
|
||||
|
||||
/* in the planner we use a null gasmix to indicate that we keep using the gas as before
|
||||
* this is BAD as a null gasmix can also be interpreted as air.
|
||||
* DANGER DANGER DANGER */
|
||||
static inline bool gasmix_is_null(const struct gasmix *gasmix)
|
||||
{
|
||||
return gasmix->he.permille == 0 && gasmix->o2.permille == 0;
|
||||
}
|
||||
|
||||
/* Linear interpolation between 'a' and 'b', when we are 'part'way into the 'whole' distance from a to b */
|
||||
static inline int interpolate(int a, int b, int part, int whole)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue