add line | add circle | zoom | selectable geometry | geometry define entities type
This commit is contained in:
@@ -163,7 +163,7 @@ export function createEditingEngine(options: {
|
||||
ring.forEach((pt, idx) => {
|
||||
const dx = pt[0] - click[0];
|
||||
const dy = pt[1] - click[1];
|
||||
const d = dx * dx + dy * dy;
|
||||
const d = dx * dx + dy * dy; // Dùng khoảng cách Euclid bình phương để so sánh nhanh, không cần sqrt.
|
||||
if (d < bestDist) {
|
||||
bestDist = d;
|
||||
nearestIdx = idx;
|
||||
|
||||
Reference in New Issue
Block a user