getSegmentIndexFromEndPointIndex method

int getSegmentIndexFromEndPointIndex(
  1. int pointIndex
)

Converts from a point index to a segment index that uses the given point as an end point. If the point is not an end point then -1 is returned.

Parameters:

  • pointIndex — Zero-based index of the point.

Return Value: The segment index containing the end point. If the point index is not an end point, then -1 is returned.

Implementation

int getSegmentIndexFromEndPointIndex(
  int pointIndex,
) {
  return _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ImmutablePart_getSegmentIndexFromEndPointIndex(
      _handle,
      pointIndex,
      errorHandler,
    );
  });
}