diff --git a/X10D/src/Int16Extensions/Int16Extensions.cs b/X10D/src/Int16Extensions/Int16Extensions.cs index 5458e3c..7395943 100644 --- a/X10D/src/Int16Extensions/Int16Extensions.cs +++ b/X10D/src/Int16Extensions/Int16Extensions.cs @@ -66,7 +66,7 @@ namespace X10D /// public static bool IsEven(this short value) { - return value % 2 == 0; + return (value & 1) == 0; } /// diff --git a/X10D/src/Int32Extensions/Int32Extensions.cs b/X10D/src/Int32Extensions/Int32Extensions.cs index f7e66ee..77b6820 100644 --- a/X10D/src/Int32Extensions/Int32Extensions.cs +++ b/X10D/src/Int32Extensions/Int32Extensions.cs @@ -66,7 +66,7 @@ namespace X10D /// public static bool IsEven(this int value) { - return value % 2 == 0; + return (value & 1) == 0; } /// diff --git a/X10D/src/Int64Extensions/Int64Extensions.cs b/X10D/src/Int64Extensions/Int64Extensions.cs index d5d13bd..da43cea 100644 --- a/X10D/src/Int64Extensions/Int64Extensions.cs +++ b/X10D/src/Int64Extensions/Int64Extensions.cs @@ -66,7 +66,7 @@ namespace X10D /// public static bool IsEven(this long value) { - return value % 2 == 0; + return (value & 1) == 0; } ///