最新回答 / 夏目沫沫
/*** 计算a到b的距离* @param a* @param b*/let getDistance = (a: Point, b:Point) => {let dx = a.x - b.x;let dy = a.y - b.y;let distance:number = Math.sqrt(dx*dx+dy*dy);console.log('distance = ', distance);}<...code...>
2021-07-17