Beispiel #1
0
    Line2(ref Vector2 pt1, ref Vector2 pt2)
    {
        p1 = pt1;
        p2 = pt2;

        a = p2.y - p1.y;
        b = p1.x - p2.x;
        c = p2.x * p1.y - p1.x * p2.y;

                #if UNITY_EDITOR
        if (Math2d.Approximately(a, 0.0f) && Math2d.Approximately(b, 0.0f))
        {
            Debug.LogError("DistanceFromPoint Zero!");
        }
                #endif
    }