double lerp(double begin, double end, double percentage) { return begin + (end - begin) * percentage; }