mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-25 13:21:18 +00:00
13 lines
311 B
C
13 lines
311 B
C
#include "pspmath.h"
|
|
|
|
float vfpu_cosf(float rad) {
|
|
float result;
|
|
__asm__ volatile (
|
|
"mtv %1, S000\n"
|
|
"vcst.s S001, VFPU_2_PI\n"
|
|
"vmul.s S000, S000, S001\n"
|
|
"vcos.s S000, S000\n"
|
|
"mfv %0, S000\n"
|
|
: "=r"(result) : "r"(rad));
|
|
return result;
|
|
}
|