sm64ex-coop/lib/src/guNormalize.c

9 lines
191 B
C
Raw Normal View History

2019-08-25 06:46:40 +02:00
#include "libultra_internal.h"
void guNormalize(f32 *x, f32 *y, f32 *z) {
f32 tmp = 1.0f / sqrtf(*x * *x + *y * *y + *z * *z);
*x = *x * tmp;
*y = *y * tmp;
*z = *z * tmp;
}