Created
September 15, 2010 07:25
-
-
Save DanielKeep/580365 to your computer and use it in GitHub Desktop.
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
" | |
Function to compute DPI from diagonal screen length | |
and pixel dimensions. | |
Written in MathEval: http://github.com/DanielKeep/MathEval | |
" | |
let dpi(phD, pxW, pxH) = pxW / (phD / sqrt((pxH/pxW)**2 + 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment