diff --git a/src/util/canvas-util.js b/src/util/canvas-util.js index b2ee57db..5c51560b 100644 --- a/src/util/canvas-util.js +++ b/src/util/canvas-util.js @@ -80,7 +80,7 @@ export const getCenterPoint = (point1, point2) => { * @returns */ export const getDistance = (x1, y1, x2, y2) => { - return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)).toFixed(0) + return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)).toFixed(1) } // polygon의 각 변에 해당 점과 점 사이의 거리를 나타내는 IText를 추가하는 함수