Created
March 7, 2017 13:31
-
-
Save grim-yawn/a70e62f10bff0ce26292b9038cafcc9f to your computer and use it in GitHub Desktop.
Magic numbers
This file contains hidden or 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
| double calculateBottom(double x, double z) { | |
| if (21.75 <= x && x <= 44.78 && 74.32 <= z && z <= 114.12) { | |
| return 0.82; | |
| } else if (21.75 <= x && x <= 44.78 && 70.84 <= z && z <= 74.32) { | |
| return 0.82 * (z - 70.84)/(74.32 - 70.84); | |
| } else if (17.46 <= x && x <= 21.77 && 88.88 <= z && z <= 94.12) { | |
| return 0.82 * (x - 17.46) / (21.77 - 17.46); | |
| } else if (44.67 <= x && x <= 48.47 && 88.88 <= z && z <= 94.12) { | |
| return 0.82 * (x - 48.97) / (44.67 - 48.97); | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment