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
  1. /// pulse(a,b,x)
  2. //
  3. // Returns 1 when (a <= x <= b), 0 otherwise.
  4. //
  5. // a lower bound, real
  6. // b upper bound, real
  7. // x value, real
  8. //
  9. /// gmlscripts.pro/license
  10. {
  11. return ((argument0 <= argument2) && (argument2 <= argument1));
  12. }

Contributors: xot

GitHub: View · Commits · Blame · Raw