Created
November 27, 2015 08:59
-
-
Save XProger/8fcb51149a04bf6e7f26 to your computer and use it in GitHub Desktop.
sort 3 floats
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
| vec3 cuteSort(vec3 n) { | |
| float a = min(min(n.x, n.y), n.z); | |
| float b = max(max(n.x, n.y), n.z); | |
| return vec3(a, n.x + n.y + n.z - a - b, b); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment