Last active
August 29, 2015 14:07
-
-
Save hakusaro/2c69945b21783fb74807 to your computer and use it in GitHub Desktop.
This stupid bit of code finds the middle of 3 values.
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
if (first < second && third > second || third < second && first > second) | |
middle = second; | |
if (third < first && second > first || second < first && third > first) | |
middle = first; | |
if (second < third && first > third || first < third && second > third) | |
middle = third; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment