Exemplo n.º 1
0
    public bool IsItTurningLeft(float currentAngle, float targetAngle)
    {
        float leftPath = CommonCalculateFunctions.LeftPathCalculator(currentAngle, targetAngle);

        if (leftPath <= 180)
        {
            targetPathValue = leftPath;
            return(true);
        }
        else
        {
            float rightPath = 360 - leftPath;
            targetPathValue = rightPath;
            return(false);
        }
    }
Exemplo n.º 2
0
    public bool IsAngleGreaterThanNinenty() // Top ve bot part arasindaki aci 90 dan buyukmu
    {
        float topPart    = CommonCalculateFunctions.PositiveAngleConverter(lastTopPartAngle);
        float bottomPart = CommonCalculateFunctions.PositiveAngleConverter(lastBottomPartAngle);
        float leftPath   = CommonCalculateFunctions.LeftPathCalculator(bottomPart, topPart);

        if (leftPath <= 180)
        {
            return(leftPath > 90);
        }
        else
        {
            float rightPath = 360 - leftPath;
            return(rightPath > 90);
        }
    }