distanceToSquared static method
距离的平方
Implementation
static double distanceToSquared(DFPosition point1, DFPosition point2) {
final dx = point1.x - point2.x;
final dy = point1.y - point2.y;
return dx * dx + dy * dy;
}
距离的平方
static double distanceToSquared(DFPosition point1, DFPosition point2) {
final dx = point1.x - point2.x;
final dy = point1.y - point2.y;
return dx * dx + dy * dy;
}