Created
August 8, 2017 21:50
-
-
Save ehermes/043344a4526603d17c2e594954ee2cbf to your computer and use it in GitHub Desktop.
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
if gt(G.x * G.y * G.z, 0): | |
# Procedure A3 | |
i = 2 * gt(G.x, 0) - 1 | |
j = 2 * gt(G.y, 0) - 1 | |
k = 2 * gt(G.z, 0) - 1 | |
# i = -1 if G.x < -G.epsilon else 1 | |
# j = -1 if G.y < -G.epsilon else 1 | |
# k = -1 if G.z < -G.epsilon else 1 | |
else: | |
# Procedure A4 | |
i = 2 * lt(G.x, 0) - 1 | |
j = 2 * lt(G.y, 0) - 1 | |
k = 2 * lt(G.z, 0) - 1 | |
# i = -1 if 0 < G.x - G.epsilon else 1 | |
# j = -1 if 0 < G.y - G.epsilon else 1 | |
# k = -1 if 0 < G.z - G.epsilon else 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment