1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-25 14:47:29 +00:00

Added helper for aspect ratio

This commit is contained in:
Myned 2017-11-19 23:29:24 -05:00
parent ea48d7c6bf
commit 916f4eb782

View file

@ -159,6 +159,13 @@ def get_kwargs(ctx, args, *, limit=False):
raise exc.BoundsError(arg) raise exc.BoundsError(arg)
return {'destination': destination, 'remaining': remaining, 'remove': rm, 'limit': lim} return {'destination': destination, 'remaining': remaining, 'remove': rm, 'limit': lim}
def get_aspectratio(a, b):
divisor = gcd(a, b)
return f'{int(a / divisor)}:{int(b / divisor)}'
def ci(pos, n): def ci(pos, n):
z = 1.96 z = 1.96
phat = float(pos) / n phat = float(pos) / n