Back to project page mcdroid.
The source code is released under:
Apache License
If you think the Android project mcdroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package cn.mibcxb.util; /*from w w w.ja va 2 s . com*/ public final class McMath { public static final int clip(final int n, final int min, final int max) { return Math.min(Math.max(n, min), max); } public static final double clip(final double n, final double min, final double max) { return Math.min(Math.max(n, min), max); } private McMath() { } }