distanceTo method Null safety
- Point<
T> other
Returns the distance between this
and other
.
Implementation
double distanceTo(Point<T> other) {
var dx = x - other.x;
var dy = y - other.y;
return sqrt(dx * dx + dy * dy);
}
Returns the distance between this
and other
.
double distanceTo(Point<T> other) {
var dx = x - other.x;
var dy = y - other.y;
return sqrt(dx * dx + dy * dy);
}