is_odd
/*
** Usage:
** is_odd(value)
**
** Arguments:
** value a real value
**
** Returns:
** TRUE if the given value is odd,
** FALSE otherwise
**
** GMLscripts.com
*/
{
return (argument0 & 1);
}
** Usage:
** is_odd(value)
**
** Arguments:
** value a real value
**
** Returns:
** TRUE if the given value is odd,
** FALSE otherwise
**
** GMLscripts.com
*/
{
return (argument0 & 1);
}
[Please Login]
Projects: 0
Contributors: Leif902, Schreib, SerMSYS
History:
Apr 14, 2007 - Leif902 submits original script.
Nov 11, 2007 - SerMSYS fixes a bug regarding the handling of negative numbers.
Feb 2, 2008 - Schreib submits faster script that handles negative numbers and accumulated FP errors.
comments powered by Disqus

Related: