Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple routine advances
<?php
// Example of simple code
$points = $deviceUnits * ( POINTS_PER_INCH / DeviceUnitsPerInch() );
// You can create a simple routine like that
function DeviceUnitsToPoints($deviceUnits) {
return $deviceUnits * ( POINTS_PER_INCH / DeviceUnitsPerInch() );
}
// And then replace the simple code above with
$points = DeviceUnitsToPoints($deviceUnits);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment