src/Tools/babylon.earcut.js
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
check if a diagonal between two polygon nodes is valid (lies in polygon interior)
check if a diagonal between two polygon nodes is valid ( lies in polygon interior )
function isValidDiagonal(a, b) {
        return a.next.i !== b.i &&
            a.prev.i !== b.i &&
            !intersectsPolygon(a, b) &&
            locallyInside(a, b) &&
            locallyInside(b, a) &&
            middleInside(a, b);
    }
function isValidDiagonal ( a , b ) { return a . next . i !== b . i && a . prev . i !== b . i && ! intersectsPolygon ( a , b ) && locallyInside ( a , b ) && locallyInside ( b , a ) && middleInside ( a , b ) ; }
check if a diagonal between two polygon nodes is valid (lies in polygon interior)
check if a diagonal between two polygon nodes is valid ( lies in polygon interior )