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
|
@ -104,7 +104,7 @@ static void interpolate_transition(struct deco_state *ds, struct dive *dive, dur
|
|||
int32_t j;
|
||||
|
||||
for (j = t0.seconds; j < t1.seconds; j++) {
|
||||
depth_t depth = depth_t { .mm = interpolate(d0.mm, d1.mm, j - t0.seconds, t1.seconds - t0.seconds) };
|
||||
depth_t depth = interpolate(d0, d1, j - t0.seconds, t1.seconds - t0.seconds);
|
||||
add_segment(ds, dive->depth_to_bar(depth), gasmix, 1, po2.mbar, divemode, prefs.bottomsac, true);
|
||||
}
|
||||
if (d1.mm > d0.mm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue