mirror of
https://github.com/zeldaret/tp
synced 2026-09-10 04:02:20 -04:00
c_m3d, c_request OK. Work on Z2Audience (#1900)
This commit is contained in:
@@ -16,6 +16,20 @@ struct TSinCosTable {
|
||||
}
|
||||
return table[(u16)(8192.0f * v) & 0x1fff].first;
|
||||
}
|
||||
|
||||
inline f32 sinDegree(f32 degree) {
|
||||
if (degree < 0.0f) {
|
||||
return -table[(u16)(-22.755556106567383f * degree) & 0x1fffU].first;
|
||||
}
|
||||
return table[(u16)(22.755556106567383f * degree) & 0x1fffU].first;
|
||||
}
|
||||
|
||||
inline f32 cosDegree(f32 degree) {
|
||||
if (degree < 0.0f) {
|
||||
degree = -degree;
|
||||
}
|
||||
return table[(u16)(22.755556106567383f * degree) & 0x1fffU].second;
|
||||
}
|
||||
};
|
||||
|
||||
struct TAtanTable {
|
||||
@@ -52,4 +66,12 @@ inline f32 JMASinLap(f32 v) {
|
||||
return JMath::sincosTable_.sinLap(v);
|
||||
}
|
||||
|
||||
inline f32 JMASinDegree(f32 degree) {
|
||||
return JMath::sincosTable_.sinDegree(degree);
|
||||
}
|
||||
|
||||
inline f32 JMACosDegree(f32 degree) {
|
||||
return JMath::sincosTable_.cosDegree(degree);
|
||||
}
|
||||
|
||||
#endif /* JMATRIGONOMETRIC_H */
|
||||
|
||||
Reference in New Issue
Block a user