summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMattias Blum <142374929+mattias-blum@users.noreply.github.com>2026-07-19 17:00:55 -0400
committerGitHub <noreply@github.com>2026-07-19 17:00:55 -0400
commit61a3a0ac17969f0d75f704ee43aefcc5a6c8ddb3 (patch)
treee5976c7b2bb0ce8fbef80ccbad5603c65879cf3c /include
parent0fdc3a3f3b1bd96ad65ccee764967e964b3a7eab (diff)
d_cam_param 100% for GZLE01 (#1126)
* initial progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * fix outdated member names * more progress * more progress * more progress * more progress * more progress * more progress * fixed deprecated member references * more progress * more progress * more progress * fix deprecated member references * more progress * more progress * more progress * more progress * more progress * check in for review * remove comment * initial PR changes * more PR changes * more PR changes * added anonymous struct as class member * reverted changes to `stage_camera2_data_class` * added `dCamera_event_data`, `dCamera_monitoring_things` and `dCamera_DMC_system` from debug maps * more progress * more progress * realmatch for `camera_draw` * PR changes * fix broken merge * formatting * Reverted change to `camSphChkdata` that caused `sph_chk_callback` match to regress * Reverted change to `BG` struct that caused ctor and dtor match to regress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * more progress * PR changes * corrected size comment * fixed broken member references * more d_camera work * remove comment * update symbols * d_cam_param 100% for GZLE01 Code is 100% matching * Update math.h
Diffstat (limited to 'include')
-rw-r--r--include/SSystem/SComponent/c_angle.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/include/SSystem/SComponent/c_angle.h b/include/SSystem/SComponent/c_angle.h
index 6af9560b..0ca77ec4 100644
--- a/include/SSystem/SComponent/c_angle.h
+++ b/include/SSystem/SComponent/c_angle.h
@@ -59,13 +59,33 @@ cSAngle operator+(short, const cSAngle&);
cSAngle operator-(short, const cSAngle&);
struct cAngle {
- static f32 Radian_to_Degree(f32 rad) { return rad * 57.2957763671875f; }
- static f32 Degree_to_Radian(f32 deg) { return deg * 0.017453292f; }
- static s16 Degree_to_SAngle(f32 deg) { return deg * 182.04444885253906f; }
- static f32 SAngle_to_Degree(s16 angle) { return (360.0f / 65536.0f) * angle; }
- static f32 SAngle_to_Radian(s16 angle) { return 9.58738E-5f * angle; }
- static f32 SAngle_to_Normal(s16 angle) { return 3.0517578E-5f * angle; }
- static s16 Radian_to_SAngle(f32 rad) { return rad * 10430.378f; }
+ static f32 Radian_to_Degree(f32 rad) {
+ return rad * (180.0f / M_PI);
+ }
+
+ static f32 Degree_to_Radian(f32 deg) {
+ return deg * (M_PI / 180.0f);
+ }
+
+ static s16 Degree_to_SAngle(f32 deg) {
+ return deg * (65536.0f / 360.0f);
+ }
+
+ static f32 SAngle_to_Degree(s16 angle) {
+ return angle * (360.0f / 65536.0f);
+ }
+
+ static f32 SAngle_to_Radian(s16 angle) {
+ return angle * ((2.0f * M_PI) / 65536.0f);
+ }
+
+ static f32 SAngle_to_Normal(s16 angle) {
+ return angle * (2.0f / 65536.0f);
+ }
+
+ static s16 Radian_to_SAngle(f32 rad) {
+ return rad * (65536.0f / (2.0f * M_PI));
+ }
/* Converts Radian value into Degree value */
static f32 r2d(f32 r) { return Radian_to_Degree(r); }