You are currently viewing the GMLscripts.com static mirror. Forum access and script submissions are not available through this mirror.

Invert GMLscripts.com

is_even

Returns true if a given value is even, false otherwise.

is_even(value)
Returns true if a given value is even, false otherwise.
COPY/// @func   is_even(value)
///
/// @desc   Returns true if a given value is even, false otherwise.
///
/// @param  {real}      value       value to test
///
/// @return {bool}      true if value is even
///
/// GMLscripts.com/license

function is_even(value)
{
    return (value & 1) == 0;
}

Contributors: Schreib, xot

GitHub: View · Commits · Blame · Raw