code: public int edgeIndex( TriangulationPoint p1, TriangulationPoint p2 )
      {
          if( points[0] == p1 )
          {
              if( points[1] == p2 )
              {
                  return 2;
              }
              else if( points[2] == p2 )
              {
                  return 1;                
              }
          }
          else if( points[1] == p1 )
          {
              if( points[2] == p2 )
              {
                  return 0;
              }
              else if( points[0] == p2 )
              {
                  return 2;                
              }
          }
          else if( points[2] == p1 )
          {
              if( points[0] == p2 )
              {
                  return 1;
              }
              else if( points[1] == p2 )
              {
                  return 0;                
              }            
          }
          return -1;
      }
docs: Get the neighbor that share this edge
  
  @param constrainedEdge
  @return index of the shared edge or -1 if edge isn't shared