mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-29 23:22:29 +00:00
11 lines
267 B
C
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));
|
|
}
|