c_m3d, c_request OK. Work on Z2Audience (#1900)

This commit is contained in:
hatal175
2023-08-30 02:43:28 +03:00
committed by GitHub
parent 6a4e50e74b
commit 4c5c3a8964
48 changed files with 1248 additions and 1068 deletions
+22
View File
@@ -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 */