For well-distributed points, nearest neighbor search is often near O(logn)O(\log n)O(logn) in practice. In the worst case (all points clustered tightly or along a line), it can degrade to O(n)O(n)O(n), but this is uncommon with typical spatial data.
The optimization treadmill
,更多细节参见im钱包官方下载
// 易错点:取整会破坏时间比较逻辑(比如1.333取整为2,错误判定为独立车队)
await scene.play(new Transform(square, circle));