From ede854c2152f46a70d7c3a0290bb84384ab14e22 Mon Sep 17 00:00:00 2001 From: Aya Morisawa <AyaMorisawa4869@gmail.com> Date: Thu, 22 Aug 2019 02:36:19 +0900 Subject: [PATCH] Update button.vue (#5331) --- src/client/app/common/views/components/ui/button.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/app/common/views/components/ui/button.vue b/src/client/app/common/views/components/ui/button.vue index 75acc4887..59a5c858a 100644 --- a/src/client/app/common/views/components/ui/button.vue +++ b/src/client/app/common/views/components/ui/button.vue @@ -64,8 +64,7 @@ export default Vue.extend({ methods: { onMousedown(e: MouseEvent) { function distance(p, q) { - const sqrt = Math.sqrt, pow = Math.pow; - return sqrt(pow(p.x - q.x, 2) + pow(p.y - q.y, 2)); + return Math.hypot(p.x - q.x, p.y - q.y); } function calcCircleScale(boxW, boxH, circleCenterX, circleCenterY) {