mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-09 02:45:45 -04:00
Clean up angle constants and conversions (#1135)
* Add angle conversion constants and macros * Replace angle literals with hex instead of decimal
This commit is contained in:
@@ -292,7 +292,7 @@ s32 check_flontofplayer(u32 checkMask, s16 angle1, s16 angle2) {
|
||||
|
||||
/* 8009DC28-8009DC74 .text distace_weight__Ffsf */
|
||||
f32 distace_weight(f32 distance, s16 angle, f32 ratio) {
|
||||
f32 turns = (f32)angle / 32768.0F;
|
||||
f32 turns = (f32)angle / 0x8000;
|
||||
return distance * (f32)((1.0F - ratio) + (f32)(ratio * (turns * turns)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user