diff options
| author | emilybrooks <emilybrooksemilybrooks@gmail.com> | 2023-11-26 14:13:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-26 14:13:44 -0700 |
| commit | 18b20e709c278f791f137518e0262ffd104e1243 (patch) | |
| tree | bada6c8d4f729b76dd60f145d676cf6ecf9c45f9 /src/code/m_lib.c | |
| parent | e1fcb33cef0b8e58ce3cecc2977921e685f129ba (diff) | |
m_start_data_init cleanup (#120)
* initial commit
* missed some stuff
* review
* made unk names consistent
Diffstat (limited to 'src/code/m_lib.c')
| -rw-r--r-- | src/code/m_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/code/m_lib.c b/src/code/m_lib.c index 3c7d927..f39845d 100644 --- a/src/code/m_lib.c +++ b/src/code/m_lib.c @@ -203,12 +203,12 @@ void inter_float(f32* pValue, f32 arg1, s32 stepCount) { } } -void stick_ratio_set(f32* radius, s16* angle, Input* input) { +void stick_ratio_set(f32* magnitude, s16* angle, Input* input) { f32 relX = input->rel.stick_x; f32 relY = input->rel.stick_y; - *radius = sqrtf(SQ(relX) + SQ(relY)); - *radius = (*radius > 60.0f) ? 60.0f : *radius; + *magnitude = sqrtf(SQ(relX) + SQ(relY)); + *magnitude = (*magnitude > 60.0f) ? 60.0f : *magnitude; *angle = atans_table(relY, -relX); } |
