循环递减算法 [a,b,c] 求 ab,ac,bc

有数组 lineList=[a,b,c] 求所有不同的两两组合 ,结果:ab,ac,bc

lineList.forEach((lineA,lineIndex)=>{
    if(lineIndex+1 ==len){
      return;
    }
    lineList.slice(-len+1+lineIndex).forEach(lineB=>{
      if(isSegmentsIntersectant(lineA,lineB)){
        hasIntersection = true;
      }
    })
  })
原文地址:https://www.cnblogs.com/liujinyu/p/9354635.html