Skip to content

Instantly share code, notes, and snippets.

@jacobh
Created January 21, 2012 09:51
Show Gist options
  • Save jacobh/1652223 to your computer and use it in GitHub Desktop.
Save jacobh/1652223 to your computer and use it in GitHub Desktop.
animation loop finder
width = 1920
second = 1
int_a,int_b,int_c,int_d,int_e,int_f = 384,320,240,192,160,128
a,b,c,d,e,f = int_a,int_b,int_c,int_d,int_e,int_f
status = 'fail'
while status == 'fail':
if a%1920==0 and b%1920==0 and c%1920==0 and d%1920==0 and e%1920==0 and f%1920==0 and f>=3840:
status = 'success'
else:
a += int_a
b += int_b
c += int_c
d += int_d
e += int_e
f += int_f
second += 1
print 'second: ',second
print 'a: ', a
print 'b: ', b
print 'c: ', c
print 'd: ', d
print 'e: ', e
print 'f: ', f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment