Created
January 13, 2013 16:38
-
-
Save ghalimi/4524960 to your computer and use it in GitHub Desktop.
GESTEP Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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