Skip to content

Instantly share code, notes, and snippets.

@ghalimi
Created January 13, 2013 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghalimi/4524960 to your computer and use it in GitHub Desktop.
Save ghalimi/4524960 to your computer and use it in GitHub Desktop.
GESTEP Function
// Copyright (c) 2012 Sutoiku, Inc. (MIT License)
function GESTEP(number, step) {
// Set step to zero if undefined
step = (typeof step === 'undefined') ? 0 : step;
// Return error if either number is not a number
if (isNaN(number) || isNaN(step)) return '#VALUE!';
// Return delta
return (number >= step) ? 1 : 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment