Created
February 11, 2020 17:04
-
-
Save paulhayes/565e9d776b157aeb482f4d74b99016df to your computer and use it in GitHub Desktop.
zigzag oscillating function
This file contains hidden or 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
int zigzag(int t, int scale){ | |
return abs(scale-((t+scale)%(2*scale))); | |
} |
This file contains hidden or 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
function zigzag(t, scale){ | |
return Math.abs(scale-((t+scale)%(2*scale))); | |
} |
This file contains hidden or 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
def zigzag(t, scale): | |
return abs(scale-((t+scale)%(2*scale))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment