Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/lib/src/guNormalize.c
7857 views
1
#include "libultra_internal.h"
2
3
void guNormalize(f32 *x, f32 *y, f32 *z) {
4
f32 tmp = 1.0f / sqrtf(*x * *x + *y * *y + *z * *z);
5
*x = *x * tmp;
6
*y = *y * tmp;
7
*z = *z * tmp;
8
}
9
10