Created
September 8, 2016 07:12
-
-
Save splinecraft/fad5b9d5bf09ee6fb9fcd7cfed331bad to your computer and use it in GitHub Desktop.
Find evenly divisible scales of animation lengths, for anim calculator
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
function findEvenlyDivisibleScaling(animLength) { | |
var even_scales = []; | |
for(i=1; i<100; i++) { | |
var scale = animLength * (i * 0.01); | |
if(scale % 1 === 0) | |
{ | |
even_scales.push(i * 0.01); | |
} | |
} | |
return even_scales; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment