double positiveIndex(double index) { if (index >= 0.0) return index; return linearGeom.getLength() + index; }