GMLscripts.com

toggle

Returns the given Boolean value negated. Extremely simple function mostly of use for code clarity.

toggle(b)
Returns the given Boolean value negated.
COPY
  1. /// @func toggle(b)
  2. ///
  3. /// @desc Returns the given Boolean value negated.
  4. ///
  5. /// @param {bool} b Boolean value
  6. ///
  7. /// @return {bool} negated value
  8. ///
  9. /// GMLscripts.com/license
  10.  
  11. function toggle(b)
  12. {
  13. return !b;
  14. }

Contributors: OpticalLiam

GitHub: View · Commits · Blame · Raw