mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-09 18:57:32 -04:00
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
This commit is contained in:
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user