Android Utililty Methods Int Clamp

List of utility methods to do Int Clamp

Description

The list of methods to do Int Clamp are organized into topic(s).

Method

intclamp(int x, int a, int b)
clamp
return (x < a) ? a : (x > b) ? b : x;
intclamp(int x, int min, int max)
clamp
if (x > max)
    return max;
if (x < min)
    return min;
return x;
intclamp(int x, int a, int b)
clamp
return (x < a) ? a : (x > b) ? b : x;