mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-04 10:11:51 -04:00
Fix last two functions in sys_math_atan (#1066)
* Fix extra Atan2 funcs * format * make Math_GetAtan2Tbl private * rename Depr to XY * ./format.sh i loathe thee * namefixer.py changes
This commit is contained in:
+4
-4
@@ -1072,8 +1072,8 @@ s32 SubS_TrackPoint(Vec3f* target, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* trac
|
||||
s16 targetX;
|
||||
f32 diffZ = target->z - focusPos->z;
|
||||
|
||||
yaw = Math_FAtan2F(diffZ, diffX);
|
||||
pitch = Math_FAtan2F(sqrtf(SQ(diffX) + SQ(diffZ)), target->y - focusPos->y);
|
||||
yaw = Math_Atan2S_XY(diffZ, diffX);
|
||||
pitch = Math_Atan2S_XY(sqrtf(SQ(diffX) + SQ(diffZ)), target->y - focusPos->y);
|
||||
Math_SmoothStepToS(&trackTarget->x, pitch, 4, 0x2710, 0);
|
||||
Math_SmoothStepToS(&trackTarget->y, yaw, 4, 0x2710, 0);
|
||||
|
||||
@@ -1306,8 +1306,8 @@ void SubS_ActorPathing_ComputePointInfo(PlayState* play, ActorPathing* actorPath
|
||||
diff.z = actorPath->curPoint.z - actorPath->worldPos->z;
|
||||
actorPath->distSqToCurPointXZ = Math3D_XZLengthSquared(diff.x, diff.z);
|
||||
actorPath->distSqToCurPoint = Math3D_LengthSquared(&diff);
|
||||
actorPath->rotToCurPoint.y = Math_FAtan2F(diff.z, diff.x);
|
||||
actorPath->rotToCurPoint.x = Math_FAtan2F(sqrtf(actorPath->distSqToCurPointXZ), -diff.y);
|
||||
actorPath->rotToCurPoint.y = Math_Atan2S_XY(diff.z, diff.x);
|
||||
actorPath->rotToCurPoint.x = Math_Atan2S_XY(sqrtf(actorPath->distSqToCurPointXZ), -diff.y);
|
||||
actorPath->rotToCurPoint.z = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user