code: function(t) {
  
              var segments = this.segments;
              var numSegments = segments.length;
              if (numSegments === 0) return null; // if segments is an empty array
  
              var segmentIndex = t.segmentIndex;
              if (segmentIndex < 0) return segments[0].pointAtT(0);
              if (segmentIndex >= numSegments) return segments[numSegments - 1].pointAtT(1);
  
              var tValue = t.value;
              if (tValue < 0) tValue = 0;
              else if (tValue > 1) tValue = 1;
  
              return segments[segmentIndex].pointAtT(tValue);
          }
docs: Private function.