11 lines
189 B
C
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;
|
|
} |