36#if __STDC_VERSION__ >= 199901L
37#define __FMINLINE static inline
39#define __FMINLINE extern inline
42#define __FMINLINE static
50 float a,
float b,
float c,
float d) {
51 return __fipr(x, y, z, w, a, b, c, d);
59 return __fipr_magnitude_sqr(x, y, z, w);
141 __fsincos(f, *s, *c);
154 __fsincosr(f, *s, *c);
189 return (k1 << 24) | (k2 << 16) | (k3 << 8) | qp;
196#if __STDC_VERSION__ >= 199901L || !defined(__GNUC__)
197extern float fipr(
float x,
float y,
float z,
float w,
float a,
float b,
float c,
200extern float fsin(
float r);
201extern float fcos(
float r);
202extern float ftan(
float r);
203extern float fisin(
int d);
204extern float ficos(
int d);
205extern float fitan(
int d);
206extern float fsqrt(
float f);
207extern float frsqrt(
float f);
208extern void fsincos(
float f,
float *s,
float *c);
209extern void fsincosr(
float f,
float *s,
float *c);
Base definitions for the DC's special math instructions.
__FMINLINE float fsqrt(float f)
Floating point square root.
Definition fmath.h:120
__FMINLINE float fsin(float r)
Floating point sine.
Definition fmath.h:67
#define __FMINLINE
Definition fmath.h:42
__FMINLINE void fsincos(float f, float *s, float *c)
Calculate the sine and cosine of a value in degrees.
Definition fmath.h:140
__FMINLINE float frsqrt(float f)
Definition fmath.h:127
__FMINLINE float fisin(int d)
Integer sine.
Definition fmath.h:94
__FMINLINE void fsincosr(float f, float *s, float *c)
Calculate the sine and cosine of a value in radians.
Definition fmath.h:153
__FMINLINE float fcos(float r)
Floating point cosine.
Definition fmath.h:76
__FMINLINE uint32 pvr_pack_bump(float h, float t, float q)
Calculate the offset color value for a set of bumpmap parameters.
Definition fmath.h:181
__FMINLINE float fipr_magnitude_sqr(float x, float y, float z, float w)
Floating point inner product w/self (square of vector magnitude)
Definition fmath.h:58
__FMINLINE float fitan(int d)
Integer tangent.
Definition fmath.h:112
__FMINLINE float ficos(int d)
Integer cosine.
Definition fmath.h:103
#define F_PI
PI constant (if you don't want full math.h)
Definition fmath_base.h:32
__FMINLINE float ftan(float r)
Floating point tangent.
Definition fmath.h:85
__FMINLINE float fipr(float x, float y, float z, float w, float a, float b, float c, float d)
Floating point inner product.
Definition fmath.h:49
unsigned long uint32
32-bit unsigned integer
Definition types.h:33
unsigned char uint8
8-bit unsigned integer
Definition types.h:35