private float GetEnemyTimeOuttaE(AIHeroClient enemy) { var enemyDestination = Prediction.Position.GetRealPath(enemy).Last(); Geometry.Polygon.Circle circle = new Geometry.Polygon.Circle(me.Position, E.Range); var intersection = circle.GetIntersectionPointsWithLineSegment(enemy.Position.To2D(), enemyDestination.To2D()).OrderBy(x => x.Distance(enemy)) .First(); float distToCircleEnd = enemy.Distance(intersection); float dt = (distToCircleEnd / enemy.MoveSpeed) * 1000; //ms return(dt); }