distanceToCenter static method
计算点到六边形中心的距离
Implementation
static double distanceToCenter(FreeHexagon hex, Offset point) {
return math.sqrt(
math.pow(hex.center.dx - point.dx, 2) +
math.pow(hex.center.dy - point.dy, 2),
);
}
计算点到六边形中心的距离
static double distanceToCenter(FreeHexagon hex, Offset point) {
return math.sqrt(
math.pow(hex.center.dx - point.dx, 2) +
math.pow(hex.center.dy - point.dy, 2),
);
}