Update button.vue (#5331)

This commit is contained in:
Aya Morisawa 2019-08-22 02:36:19 +09:00 committed by syuilo
parent 6a953b4d94
commit ede854c215
1 changed files with 1 additions and 2 deletions

View File

@ -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) {