euclideanDistance method

  1. @override
Distance euclideanDistance(
  1. NaCoordinate to
)
override

Implementation

@override
Distance euclideanDistance(NaCoordinate to) {
  if (to is NaLatLong) {
    return Distance(
      NaCalculator.euclideanDistance2D(this.latitude.value,
          this.longitude.value, to.latitude.value, to.longitude.value),
    );
  } else {
    throw Exception(
        '${to.runtimeType} is not subType of NaLatLong! make sure to use NaLatLong Type!');
  }
}