From be9547321a1860d47956c52be0ba5c6c87a5c416 Mon Sep 17 00:00:00 2001 From: Masanari Hamada Date: Sun, 8 Dec 2024 01:18:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20floor=E3=82=92=E6=88=BB=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/simulator-configs/simulator-chair-config.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/modules/simulator-configs/simulator-chair-config.tsx b/frontend/app/components/modules/simulator-configs/simulator-chair-config.tsx index bc390c75..37de454e 100644 --- a/frontend/app/components/modules/simulator-configs/simulator-chair-config.tsx +++ b/frontend/app/components/modules/simulator-configs/simulator-chair-config.tsx @@ -26,9 +26,11 @@ const progress = ( const currentToEnd = Math.abs(end.latitude - current.latitude) + Math.abs(end.longitude - current.longitude); - return Math.max( - Math.min(((startToEnd - currentToEnd) / startToEnd) * 100, 100), - 0, + return Math.floor( + Math.max( + Math.min(((startToEnd - currentToEnd) / startToEnd) * 100, 100), + 0, + ), ); };