Added isEven to MathUtil

This commit is contained in:
nathan 2017-02-27 13:01:07 +01:00
parent b336b92be1
commit d3a95fa6ef

View File

@ -94,6 +94,11 @@ class MathUtil {
// ---
public static
boolean isEven(int value) {
return (value & 1) == 0;
}
/**
* Returns the next power of two. Returns the specified value if the value is already a power of two.
*/