Eran.ITU.Utils.ITU_MathUtils.PointInTriangle(UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2)

Here are the examples of the csharp api Eran.ITU.Utils.ITU_MathUtils.PointInTriangle(UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : ITU_MathUtils.cs
License : MIT License
Project Creator : Tunied

private static bool IsPointInDiamond(Vector2 _localPoint, float _tileWidth, float _tileHeigh)
        {
            var pa = new Vector2(_tileWidth / 2, 0);
            var pb = new Vector2(_tileWidth, -_tileHeigh / 2);
            var pc = new Vector2(_tileWidth / 2, -_tileHeigh);
            var pd = new Vector2(0, -_tileHeigh / 2);
            return PointInTriangle(_localPoint, pa, pb, pc) || PointInTriangle(_localPoint, pd, pa, pc);
        }