mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: implement interpolate() function for unit types
Calls the global interpolate() function for integer types. For now, the template is enabled if the arguments are not integer types. Might want to refine that in the future. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
133bc50d53
commit
64945a1c96
4 changed files with 22 additions and 4 deletions
|
|
@ -432,7 +432,7 @@ static void add_dive_to_deco(struct deco_state *ds, const struct dive &dive, boo
|
|||
int j;
|
||||
|
||||
for (j = t0; j < t1; j++) {
|
||||
depth_t depth = { .mm = interpolate(psample.depth.mm, sample.depth.mm, j - t0, t1 - t0) };
|
||||
depth_t depth = interpolate(psample.depth, sample.depth, j - t0, t1 - t0);
|
||||
auto gasmix = loop.at(j).first;
|
||||
add_segment(ds, dive.depth_to_bar(depth), gasmix, 1, sample.setpoint.mbar,
|
||||
loop_d.at(j), dive.sac,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue