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

Invert GMLscripts.com

pulse

This function uses two steps to form a pulse. Output is high (true) when the given value t is between a and b.

pulse

pulse(a,b,x)
Returns 1 when (a <= x <= b), 0 otherwise.
COPY/// pulse(a,b,x)
//
//  Returns 1 when (a <= x <= b), 0 otherwise.
//
//      a           lower bound, real
//      b           upper bound, real
//      x           value, real
//
/// GMLscripts.com/license
{
    return ((argument0 <= argument2) && (argument2 <= argument1));
}

Contributors: xot

GitHub: View · Commits · Blame · Raw