Diagonal movement GeoEngine.

This commit is contained in:
MobiusDev
2017-08-26 20:50:32 +00:00
parent 1e943ff506
commit 05f0a141c3
549 changed files with 25017 additions and 20141 deletions

View File

@@ -80,4 +80,15 @@ public class MathUtil
{
return oldValue / value;
}
/**
* @param numToTest : The number to test.
* @param min : The minimum limit.
* @param max : The maximum limit.
* @return the number or one of the limit (mininum / maximum).
*/
public static int limit(int numToTest, int min, int max)
{
return (numToTest > max) ? max : ((numToTest < min) ? min : numToTest);
}
}