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

Invert gmlscripts.pro

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.pro/license
{
    return ((argument0 <= argument2) && (argument2 <= argument1));
}

Contributors: xot

GitHub: View · Commits · Blame · Raw