Example #1
0
        private static FP CalculateBeta(TSVector2 point, YuPengClipper.Edge e, FP coefficient)
        {
            FP   result = 0f;
            bool flag   = YuPengClipper.PointInSimplex(point, e);

            if (flag)
            {
                result = coefficient;
            }
            bool flag2 = YuPengClipper.PointOnLineSegment(TSVector2.zero, e.EdgeStart, point) || YuPengClipper.PointOnLineSegment(TSVector2.zero, e.EdgeEnd, point);

            if (flag2)
            {
                result = 0.5f * coefficient;
            }
            return(result);
        }