dquakeplus/source/libpspmath/vfpu_normalize_vector.c
2022-02-08 16:49:56 -05:00

11 lines
267 B
C

#include "pspmath.h"
void vfpu_normalize_vector(ScePspFVector4 *v) {
__asm__ volatile (
"lv.q C000, %0\n"
"vdot.t S010, C000, C000\n"
"vrsq.s S010, S010\n"
"vscl.t C000, C000, S010\n"
"sv.q C000, %0\n"
: "+m"(*v));
}