Category5.Victim.getAngleToPoint C# (CSharp) Method

getAngleToPoint() protected method

gets the heading to target tornado
protected getAngleToPoint ( Vector2 TargetPoint ) : float
TargetPoint Vector2
return float
        protected float getAngleToPoint(Vector2 TargetPoint)
        {
            float workingangle = (float)Math.Atan2((this.bounds.Center.Y - TargetPoint.Y), (TargetPoint.X - this.bounds.Center.X));
            return ((float)Math.PI / 2) - workingangle;
        }