1#ifndef NW4HBM_MATH_ARITHMETIC_H
2#define NW4HBM_MATH_ARITHMETIC_H
28 return *
reinterpret_cast<u32*
>(&
x);
32 return *
reinterpret_cast<f32*
>(&
x);
50#if defined(__MWERKS__)
51 asm { fsel ret, cond, ifPos, ifNeg }
54#pragma unused(cond, ifPos, ifNeg)
64#if defined(__MWERKS__)
77#if defined(__MWERKS__)
135 return std::pow(
x, 1.0f / 3.0f);
141#if defined(__MWERKS__)
142 asm { cntlzw result,
x }
int abs(int n)
Definition arith.c:3
static s16 neg[7]
Definition d_a_obj_gm.cpp:55
static u32 t1
Definition dsp_task.c:8
static u32 t2
Definition dsp_task.c:8
void OSf32tos16(f32 *f, s16 *out)
Definition os.h:307
float fabs(float x)
Definition sdk_math.h:35
double x double x
Definition e_atan2.c:58
double x double y
Definition e_atan2.c:58
double u
Definition e_pow.c:114
int sign
Definition e_sqrt.c:99
unsigned long u32
Definition types.h:12
signed short int s16
Definition types.h:9
float f32
Definition types.h:25
unsigned short int u16
Definition types.h:10
signed long s32
Definition types.h:11
f32 U32AsF32(u32 x)
Definition arithmetic.h:31
f32 FGetMantPart(f32 f)
Definition arithmetic.h:41
f32 FAbs(register f32 x)
Definition arithmetic.h:61
u32 CntLz(register u32 x)
Definition arithmetic.h:138
s32 FGetExpPart(f32 f)
Definition arithmetic.h:35
u16 F32ToU16(f32 x)
Definition arithmetic.h:106
f32 AcosRad(f32 x)
Definition arithmetic.h:87
f32 Hermite(f32 p1, f32 t1, f32 p2, f32 t2, f32 s)
f32 FNAbs(register f32 x)
Definition arithmetic.h:74
f32 U16ToF32(u16 x)
Definition arithmetic.h:114
f32 S16ToF32(s16 x)
Definition arithmetic.h:122
f32 Bezier(f32 p1, f32 p2, f32 p3, f32 p4, f32 s)
u32 F32AsU32(f32 x)
Definition arithmetic.h:27
s16 F32ToS16(f32 x)
Definition arithmetic.h:98
u32 DistBit(u32 const *first1, u32 const *last1, u32 const *first2)
f32 CatmullRom(f32 p0, f32 p1, f32 p2, f32 p3, f32 s)
f32 FSelect(register f32 cond, register f32 ifPos, register f32 ifNeg)
Definition arithmetic.h:47
f32 FSqrt(f32 x)
Definition arithmetic.h:130
f32 FCopySign(f32 abs, f32 sign)
Definition arithmetic.h:91
f32 FCbrt(f32 x)
Definition arithmetic.h:134
Definition HBMAnmController.h:6
static void OSu16tof32(u16 const *in, f32 *out)
Definition os.h:415
static void OSs16tof32(s16 const *in, f32 *out)
Definition os.h:411
static void OSf32tou16(f32 const *in, u16 *out)
Definition os.h:403