aboutsummaryrefslogtreecommitdiffstats
path: root/core/dive.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-25 18:14:23 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-25 13:59:52 -0700
commitf728923c79873cf9a182e3b37e5c79e6ecc9fe8d (patch)
tree01d08f85f8f5e887866b4ffe7673afa2f912317f /core/dive.h
parentf9c3227975e02a576c039e55a2d775dd9d691e03 (diff)
downloadsubsurface-f728923c79873cf9a182e3b37e5c79e6ecc9fe8d.tar.gz
cleanup: move interpolate inline function to its own header file
This is not really related to struct dive, so let's move it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.h')
-rw-r--r--core/dive.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/core/dive.h b/core/dive.h
index 0b0597477..3e30ff521 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -21,17 +21,6 @@ extern const char *cylinderuse_text[NUM_GAS_USE];
extern const char *divemode_text_ui[];
extern const char *divemode_text[];
-/* 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)
-{
- /* It is doubtful that we actually need floating point for this, but whatever */
- if (whole) {
- double x = (double)a * (whole - part) + (double)b * part;
- return (int)lrint(x / whole);
- }
- return (a+b)/2;
-}
-
struct dive_site;
struct dive_site_table;
struct dive_table;