SimpleSoccer.Net.PlayerBase.IsPositionInFrontOfPlayer C# (CSharp) Метод

IsPositionInFrontOfPlayer() приватный Метод

private IsPositionInFrontOfPlayer ( Vector2D position ) : bool
position Vector2D
Результат bool
        bool IsPositionInFrontOfPlayer(Vector2D position)
        {
            Vector2D ToSubject = position - Position;

            if (ToSubject.GetDotProduct(Heading) > 0)

                return true;

            else

                return false;
        }