Updated functions to display 32:9 ratios

This commit is contained in:
Alex Chirila 2017-10-19 09:18:40 +03:00
parent 9efbda08f4
commit faa75b6c5b

View File

@ -19,7 +19,7 @@ function simplify($num,$den) {
function get_title($width, $height) { function get_title($width, $height) {
$title = $width . "x" . $height; $title = $width . "x" . $height;
$ratio = simplify($width, $height); $ratio = simplify($width, $height);
if ($ratio[0] != 16 && $ratio[1] != 9) { if (!($ratio[0] == 16 && $ratio[1] == 9)) {
if ($ratio[0] == 64 && $ratio[1] == 27) { if ($ratio[0] == 64 && $ratio[1] == 27) {
// 64:27 is the true ratio, but 21:9 is the common approximation // 64:27 is the true ratio, but 21:9 is the common approximation
$title = $title . " (21:9)"; $title = $title . " (21:9)";