velocity method
Calculates the velocity along this line segment.
accuracy
The accuracy for calculating the length of the curve.
Returns the velocity, or 0.0 if start and end timestamps are the same.
Implementation
double velocity({double accuracy = 0.0}) => start.timestamp != end.timestamp
? length(accuracy: accuracy) / (end.timestamp - start.timestamp)
: 0.0;