Skip to content

Instantly share code, notes, and snippets.

@Oikio
Last active December 19, 2015 05:49
Show Gist options
  • Save Oikio/5907054 to your computer and use it in GitHub Desktop.
Save Oikio/5907054 to your computer and use it in GitHub Desktop.
Calculate ppi.
ppi = (w,h,d) ->
dp = Math.sqrt(Math.pow(w, 2) + Math.pow(h, 2))
dp/d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment