line.tangentAt(t)

Return a line tangent to the line at point that lies t (normalized length) away from the beginning of the line.

The function expects t to lie between 0 and 1; values outside the range are constrained to 0 and 1, respectively.

The tangent line starts at the specified point. The direction from start to end is the same as the direction of the line.

If the two endpoints of the line both lie at the same coordinates, null is returned (it is impossible to determine the slope of a point). The line.isDifferentiable() function may be used in advance to determine whether tangents can exist for a given line.