static float clamp(float x, float a, float b) { ret x < a ? a : x > b ? b : x; }