Last active
October 8, 2017 04:02
-
-
Save buiquangduc/ef4fb64de9bf3f52ee6358fc306f4d36 to your computer and use it in GitHub Desktop.
Simple routine advances
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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