ref: a8f96b5343726f5f45110c1c8350e3db5a5a30ea
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; }