Created
February 7, 2015 00:22
-
-
Save michalpelka/39c6b8e374398da52e64 to your computer and use it in GitHub Desktop.
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
float dd0 = v0[0]*v0[0]+v0[1]*v0[1]+v0[2]*v0[2]; | |
float dd1 = v1[0]*v1[0]+v1[1]*v1[1]+v1[2]*v1[2]; | |
float dd2 = v2[0]*v2[0]+v2[1]*v2[1]+v2[2]*v2[2]; | |
float fi0 = atan2f(tr->tv0[1],tr->tv0[0]); | |
float fi1 = atan2f(tr->tv1[1],tr->tv1[0]); | |
float fi2 = atan2f(tr->tv2[1],tr->tv2[0]); | |
float teta0 = atan2f(tr->tv0[2],sqrtf(tr->tv0[0]*tr->tv0[0]+tr->tv0[1]*tr->tv0[1])); | |
float teta1 = atan2f(tr->tv1[2],sqrtf(tr->tv1[0]*tr->tv1[0]+tr->tv1[1]*tr->tv1[1])); | |
float teta2 = atan2f(tr->tv2[2],sqrtf(tr->tv2[0]*tr->tv2[0]+tr->tv2[1]*tr->tv2[1])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment