Skip to content

Instantly share code, notes, and snippets.

@splinecraft
Created September 8, 2016 07:12
Show Gist options
  • Save splinecraft/fad5b9d5bf09ee6fb9fcd7cfed331bad to your computer and use it in GitHub Desktop.
Save splinecraft/fad5b9d5bf09ee6fb9fcd7cfed331bad to your computer and use it in GitHub Desktop.
Find evenly divisible scales of animation lengths, for anim calculator
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