From d3a95fa6efa078c965d1463ccfd8c2bc9a6be05f Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 27 Feb 2017 13:01:07 +0100 Subject: [PATCH] Added isEven to MathUtil --- src/dorkbox/util/MathUtil.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dorkbox/util/MathUtil.java b/src/dorkbox/util/MathUtil.java index e201ef4..1fb1b84 100644 --- a/src/dorkbox/util/MathUtil.java +++ b/src/dorkbox/util/MathUtil.java @@ -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. */