2024-06-24 07:58:31 +00:00
|
|
|
#if defined(STFU_MAIN) && !defined(STFU_INTERP)
|
|
|
|
#define STFU_INTERP
|
2024-06-13 12:47:09 +00:00
|
|
|
|
|
|
|
float stfu_linear_interpolate(float x0, float y0, float x1, float y1, float n) {
|
|
|
|
return (y0 * (x1 - n) + y1 * (n - x0)) / (x1 - x0);
|
|
|
|
}
|
2024-06-24 07:58:31 +00:00
|
|
|
|
|
|
|
#endif
|