isValidIndex method

bool isValidIndex(
  1. double index
)

Tests whether an index is in the valid index range for the line.

@param index the index to test @return true if the index is in the valid range

Implementation

bool isValidIndex(double index) {
  return (index >= getStartIndex() && index <= getEndIndex());
}