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

◆ AngleTo()

float Terraria.Entity.AngleTo ( Vector2 Destination)
inlineinherited

Definition at line 177 of file Entity.cs.

178 {
179 return (float)Math.Atan2(Destination.Y - Center.Y, Destination.X - Center.X);
180 }
static double Atan2(double y, double x)
Vector2 Center
Definition Entity.cs:43

References System.Math.Atan2(), Terraria.Entity.Center, Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.

Referenced by Terraria.NPC.AI_115_LadyBugs().