euclideanDistance method

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

Implementation

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