0 purchases
whratio 3.1.1
whratio
Calculate integer and decimal aspect ratio for dimensions.
CLI examples
$ whratio 1024 768
4 3 1.3333333333333333
$ whratio -d -n 2 256 196
1.31
whratio -WH 2560 1080 | tr " " :
64:27
Python package examples
>>> import whratio
>>> whratio.as_int(1920, 1080)
(16, 9)
>>> whratio.as_float(1920, 1080)
1.7777777777777777
>>> round(whratio.as_float(1920, 1080), 2)
1.78
Installation
Using pip:
# pip3 install whratio
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.