APL/APL1.1/SAE11_2021/utils.c
2021-11-29 00:31:21 +01:00

11 lines
189 B
C

#include <math.h>
double LerpF(double a, double b, double t) {
return a + (b - a) * t;
}
int clamp(int x, int min, int max) {
x = x > max ? max : x;
x = x < min ? min : x;
return x;
}