Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JASCalc.h
Go to the documentation of this file.
1#ifndef JASCALC_H
2#define JASCALC_H
3
4#include "dolphin/types.h"
5
10struct JASCalc {
11 static void imixcopy(const s16*, const s16*, s16*, u32);
12 static void bcopyfast(const void* src, void* dest, u32 size);
13 static void bcopy(const void* src, void* dest, u32 size);
14 static void bzerofast(void* dest, u32 size);
15 static void bzero(void* dest, u32 size);
16 static f32 pow2(f32);
17
18 // Could not make it work as inline - specialization is in JASCalc.cpp
19 template <typename A, typename B>
20 static A clamp(B x); /* {
21 if (std::numeric_limits<A>::min() >= x)
22 return std::numeric_limits<A>::min();
23 if (x >= std::numeric_limits<A>::max())
24 return std::numeric_limits<A>::max();
25 return x;
26 } */
27
28 static f32 clamp01(f32 i_value) {
29 if (i_value <= 0.0f) {
30 return 0.0f;
31 }
32 if (i_value >= 1.0f) {
33 return 1.0f;
34 }
35 return i_value;
36 }
37
38 f32 fake1();
39 f32 fake2(long x);
40 f32 fake3();
41
42 static const s16 CUTOFF_TO_IIR_TABLE[128][4];
43};
44
45#endif /* JASCALC_H */
u32 dest
Definition GXTev.c:8
const void * src
Definition __os.h:116
unsigned int size
Definition __os.h:106
unsigned long u32
Definition types.h:12
signed short int s16
Definition types.h:9
float f32
Definition types.h:25
double x double x
Definition e_atan2.c:58
Definition JASCalc.h:10
f32 fake2(long x)
Definition JASCalc.cpp:271
static const s16 CUTOFF_TO_IIR_TABLE[128][4]
Definition JASCalc.h:135
static void imixcopy(const s16 *, const s16 *, s16 *, u32)
Definition JASCalc.cpp:7
f32 fake3()
Definition JASCalc.cpp:272
static void bcopyfast(const void *src, void *dest, u32 size)
Definition JASCalc.cpp:14
static f32 pow2(f32)
Definition JASCalc.cpp:274
static A clamp(B x)
static void bzerofast(void *dest, u32 size)
Definition JASCalc.cpp:79
static void bcopy(const void *src, void *dest, u32 size)
Definition JASCalc.cpp:36
static f32 clamp01(f32 i_value)
Definition JASCalc.h:28
f32 fake1()
Definition JASCalc.cpp:270
static void bzero(void *dest, u32 size)
Definition JASCalc.cpp:93