Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AngleLerp()

static float Terraria.Utils.AngleLerp ( this float curAngle,
float targetAngle,
float amount )
inlinestatic

Definition at line 1439 of file Utils.cs.

1440 {
1441 float angle;
1442 if (targetAngle < curAngle)
1443 {
1444 float num = targetAngle + (float)Math.PI * 2f;
1446 }
1447 else
1448 {
1449 if (!(targetAngle > curAngle))
1450 {
1451 return curAngle;
1452 }
1453 float num = targetAngle - (float)Math.PI * 2f;
1455 }
1456 return MathHelper.WrapAngle(angle);
1457 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
static float WrapAngle(float angle)
Definition MathHelper.cs:87
const double PI
Definition Math.cs:16

References Microsoft.Xna.Framework.MathHelper.Lerp(), System.Math.PI, and Microsoft.Xna.Framework.MathHelper.WrapAngle().