diff --git a/X10D/src/DoubleExtensions/DoubleExtensions.cs b/X10D/src/DoubleExtensions/DoubleExtensions.cs index e6ae397..12f9b92 100644 --- a/X10D/src/DoubleExtensions/DoubleExtensions.cs +++ b/X10D/src/DoubleExtensions/DoubleExtensions.cs @@ -31,29 +31,29 @@ namespace X10D.DoubleExtensions } /// - /// Determines if the is even. + /// Returns a value indicating whether the current value is evenly divisible by 2. /// - /// The number. + /// The value whose parity to check. /// - /// Returns if is even, + /// if is evenly divisible by 2, or /// otherwise. /// - public static bool IsEven(this double number) + public static bool IsEven(this double value) { - return Math.Abs(number % 2.0) < double.Epsilon; + return Math.Abs(value % 2.0) < double.Epsilon; } /// - /// Determines if the is odd. + /// Returns a value indicating whether the current value is not evenly divisible by 2. /// - /// The number. + /// The value whose parity to check. /// - /// Returns if is odd, + /// if is not evenly divisible by 2, or /// otherwise. /// - public static bool IsOdd(this double number) + public static bool IsOdd(this double value) { - return !number.IsEven(); + return !value.IsEven(); } /// diff --git a/X10D/src/Int16Extensions/Int16Extensions.cs b/X10D/src/Int16Extensions/Int16Extensions.cs index b792904..832bbe0 100644 --- a/X10D/src/Int16Extensions/Int16Extensions.cs +++ b/X10D/src/Int16Extensions/Int16Extensions.cs @@ -47,20 +47,26 @@ namespace X10D.Int16Extensions } /// - /// Returns a value indicating whether the current 16-bit signed integer is even. + /// Returns a value indicating whether the current value is not evenly divisible by 2. /// - /// The number to check. - /// if is even, or otherwise. + /// The value whose parity to check. + /// + /// if is not evenly divisible by 2, or + /// otherwise. + /// public static bool IsEven(this short value) { return value % 2 == 0; } /// - /// Returns a value indicating whether the current 16-bit signed integer is odd. + /// Returns a value indicating whether the current value is not evenly divisible by 2. /// - /// The number to check. - /// if is odd, or otherwise. + /// The value whose parity to check. + /// + /// if is not evenly divisible by 2, or + /// otherwise. + /// public static bool IsOdd(this short value) { return !value.IsEven(); diff --git a/X10D/src/Int32Extensions/Int32Extensions.cs b/X10D/src/Int32Extensions/Int32Extensions.cs index bc23ebe..7580e22 100644 --- a/X10D/src/Int32Extensions/Int32Extensions.cs +++ b/X10D/src/Int32Extensions/Int32Extensions.cs @@ -47,20 +47,26 @@ namespace X10D.Int32Extensions } /// - /// Returns a value indicating whether the current 32-bit signed integer is even. + /// Returns a value indicating whether the current value is evenly divisible by 2. /// - /// The number to check. - /// if is even, or otherwise. + /// The value whose parity to check. + /// + /// if is evenly divisible by 2, or + /// otherwise. + /// public static bool IsEven(this int value) { return value % 2 == 0; } /// - /// Returns a value indicating whether the current 32-bit signed integer is odd. + /// Returns a value indicating whether the current value is not evenly divisible by 2. /// - /// The number to check. - /// if is odd, or otherwise. + /// The value whose parity to check. + /// + /// if is not evenly divisible by 2, or + /// otherwise. + /// public static bool IsOdd(this int value) { return !value.IsEven(); diff --git a/X10D/src/Int64Extensions/Int64Extensions.cs b/X10D/src/Int64Extensions/Int64Extensions.cs index 464ae8a..0935712 100644 --- a/X10D/src/Int64Extensions/Int64Extensions.cs +++ b/X10D/src/Int64Extensions/Int64Extensions.cs @@ -44,22 +44,27 @@ namespace X10D.Int64Extensions { return BitConverter.GetBytes(value); } - /// - /// Returns a value indicating whether the current 64-bit signed integer is even. + /// Returns a value indicating whether the current value is evenly divisible by 2. /// - /// The number to check. - /// if is even, or otherwise. + /// The value whose parity to check. + /// + /// if is evenly divisible by 2, or + /// otherwise. + /// public static bool IsEven(this long value) { return value % 2 == 0; } /// - /// Returns a value indicating whether the current 64-bit signed integer is odd. + /// Returns a value indicating whether the current value is not evenly divisible by 2. /// - /// The number to check. - /// if is odd, or otherwise. + /// The value whose parity to check. + /// + /// if is not evenly divisible by 2, or + /// otherwise. + /// public static bool IsOdd(this long value) { return !value.IsEven(); diff --git a/X10D/src/SingleExtensions/SingleExtensions.cs b/X10D/src/SingleExtensions/SingleExtensions.cs index ea5cd90..5bdf5bd 100644 --- a/X10D/src/SingleExtensions/SingleExtensions.cs +++ b/X10D/src/SingleExtensions/SingleExtensions.cs @@ -32,29 +32,29 @@ namespace X10D.SingleExtensions } /// - /// Determines if the is even. + /// Returns a value indicating whether the current value is evenly divisible by 2. /// - /// The number. + /// The value whose parity to check. /// - /// Returns if is even, + /// if is evenly divisible by 2, or /// otherwise. /// - public static bool IsEven(this float number) + public static bool IsEven(this float value) { - return ((double)number).IsEven(); + return value % 2 == 0; } /// - /// Determines if the is odd. + /// Returns a value indicating whether the current value is not evenly divisible by 2. /// - /// The number. + /// The value whose parity to check. /// - /// Returns if is odd, + /// if is not evenly divisible by 2, or /// otherwise. /// - public static bool IsOdd(this float number) + public static bool IsOdd(this float value) { - return !number.IsEven(); + return !value.IsEven(); } ///