SleePyCode Forums

Special Site & Other Boards => PasteBin => Topic started by: SleePy-Busy on Jun 08, 2009, 06:21 PM

Title: Paste-1244485264:v:use_geshi-1:v:type-php
Post by: SleePy-Busy on Jun 08, 2009, 06:21 PM
<?php

$src_height = 180;
$max_width = 100;
$src_width = 180;

$floor_height = floor($src_height * $max_width / $src_width);
$round_height = round($src_height * $max_width / $src_width);

echo $floor_height . ':' . $round_height;

?>