信号机距离计算方式修改

This commit is contained in:
yuan 2021-06-24 18:14:36 +08:00
parent 8528475bcb
commit 65d84a98a8

View File

@ -62,9 +62,9 @@ export default {
return idx;
},
// ,
//
distanceOf(a, b) {
return (b.x - a.x) ** 2 + (b.y - a.y) ** 2;
return Math.hypot(b.x - a.x, b.y - a.y);
}
}
};