#pragma once #include "common.h" class Interpolator { public: template static constexpr T InterpolateLinear(T a, T b, T t) { return a + (b - a) * t; } template static constexpr fixed InterpolateCubic( fixed cf0, fixed cf1, fixed cf2, fixed cf3, fixed t) { return ((((cf0 * t + cf1) * t) + cf2) * t) + cf3; } };