ref: 0123946b8df36a0215861b66f4fdba42e3c2dc49
dir: /sys/src/libgeometry/utils.c/
#include <u.h> #include <libc.h> #include <geometry.h> double flerp(double a, double b, double t) { return a + (b - a)*t; } double fclamp(double n, double min, double max) { return n < min? min: n > max? max: n; }