Created
August 13, 2014 17:18
-
-
Save togi/2593a6e24ad06d0aa534 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
float calculateDegrees(const glm::vec3 prev, const glm::vec3 curr, const glm::vec3 next) { | |
const glm::vec3 f_1 = glm::normalize(next - curr); | |
const glm::vec3 f_2 = glm::normalize(curr - prev); | |
return glm::angle(f_1, f_2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment