def getIsPointCloseInline(close, loop, point, pointIndex):
 afterCenterComplex = loop[pointIndex]
 if (abs((afterCenterComplex - point)) > close):
  return False
 afterEndComplex = loop[((pointIndex + 1) % len(loop))]
 if (not isInline(point, afterCenterComplex, afterEndComplex)):
  return False
 beforeCenterComplex = loop[(((pointIndex + len(loop)) - 1) % len(loop))]
 if (abs((beforeCenterComplex - point)) > close):
  return False
 beforeEndComplex = loop[(((pointIndex + len(loop)) - 2) % len(loop))]
 return isInline(point, beforeCenterComplex, beforeEndComplex)

def getIsPointCloseInline ( close , loop , point , pointIndex ) : afterCenterComplex = loop [ pointIndex ] if ( abs ( ( afterCenterComplex - point ) ) > close ) : return False afterEndComplex = loop [ ( ( pointIndex + 1 ) % len ( loop ) ) ] if ( not isInline ( point , afterCenterComplex , afterEndComplex ) ) : return False beforeCenterComplex = loop [ ( ( ( pointIndex + len ( loop ) ) - 1 ) % len ( loop ) ) ] if ( abs ( ( beforeCenterComplex - point ) ) > close ) : return False beforeEndComplex = loop [ ( ( ( pointIndex + len ( loop ) ) - 2 ) % len ( loop ) ) ] return isInline ( point , beforeCenterComplex , beforeEndComplex )
insert a point into a loop .