summary refs log tree commit diff stats
path: root/src/interpolation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/interpolation.h')
-rw-r--r--src/interpolation.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/interpolation.h b/src/interpolation.h new file mode 100644 index 0000000..d89602d --- /dev/null +++ b/src/interpolation.h
@@ -0,0 +1,26 @@
1#ifndef INTERPOLATION_H_861230A8
2#define INTERPOLATION_H_861230A8
3
4class Interpolation {
5public:
6
7 void start(int length, double amount);
8
9 void tick(double dt);
10
11 // Info
12
13 double getProgress() const { return progress_; }
14
15 bool isComplete() const { return progress_ == dest_; }
16
17private:
18
19 double progress_ = 0.0;
20 double dest_ = 0.0;
21 double start_ = 0.0;
22 double length_ = 0.0;
23 double thus_ = 0.0;
24};
25
26#endif /* end of include guard: INTERPOLATION_H_861230A8 */