DistanceFn<T> typedef
- T,
- T
A function that returns the measurable distance between any two instances
of type T
.
For nums, the distance is the difference between the two values. For DateTimes, the distance is the milliseconds between the two times.
Implementation
typedef DistanceFn<T> = double Function(T, T);