static float rclamp(float a, float b, float x) { ret x < a ? a : x > b ? b : x; } static double rclamp(double a, double b, double x) { ret x < a ? a : x > b ? b : x; } static int rclamp(int a, int b, int x) { ret x < a ? a : x > b ? b : x; } static long rclamp(long a, long b, long x) { ret x < a ? a : x > b ? b : x; }