Created
November 25, 2015 08:24
-
-
Save kdabir/bf7b003190faf784c294 to your computer and use it in GitHub Desktop.
Check screen size diagonally by providing height and width
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
sqr = (n) -> n*n | |
sqrt = (n) -> Math.sqrt n | |
hypt = (h,w) -> sqrt (sqr(h) + sqr(w)) | |
console.log hypt(10, 6.5) | |
console.log hypt(10, 6) | |
console.log hypt(6, 9) | |
console.log hypt(6, 9) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment