MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / clamp

Method clamp

src/com/cloudream/ishow/util/MathUtils.java:26–31  ·  view source on GitHub ↗
(int amount, int low, int high)

Source from the content-addressed store, hash-verified

24 }
25
26 public static int clamp(int amount, int low, int high)
27 {
28 if(BuildConfig.DEBUG && low > high)
29 throw new InvalidParameterException("low > high");
30 return amount < low ? low : (amount > high ? high : amount);
31 }
32
33 public static long clamp(long amount, long low, long high)
34 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected