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

◆ SafeNormalize()

static Vector2 Terraria.Utils.SafeNormalize ( this Vector2 v,
Vector2 defaultValue )
inlinestatic

Definition at line 1664 of file Utils.cs.

1665 {
1666 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
1667 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
1668 //IL_0015: Unknown result type (might be due to invalid IL or missing references)
1669 //IL_000d: Unknown result type (might be due to invalid IL or missing references)
1670 //IL_0017: Unknown result type (might be due to invalid IL or missing references)
1671 //IL_0018: Unknown result type (might be due to invalid IL or missing references)
1672 if (v == Vector2.Zero || v.HasNaNs())
1673 {
1674 return defaultValue;
1675 }
1676 return Vector2.Normalize(v);
1677 }

Referenced by Terraria.Player.GetGrapplingForces(), and Terraria.Player.ItemCheck_Shoot().

+ Here is the caller graph for this function: