From aa329dd2a0fa1e8e795fbe3c5a9a8559938ef19d Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 18 Jun 2024 12:21:25 +0300 Subject: [PATCH] calc --- components/calcValues.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index dca5085..40a4483 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -87,10 +87,10 @@ const changeParametres = () => { const section_without_pillar = form_state.length - form_state.fence_length - form_state.full_sections = Math.ceil(total_without_pillar / section_without_pillar) + form_state.full_sections = Math.floor(total_without_pillar / section_without_pillar) - if (section_without_pillar * form_state.full_sections == form_state.full_sections) { - form_state.extra_section = Math.ceil(total_without_pillar % section_without_pillar) + if (section_without_pillar * form_state.full_sections !== form_state.full_sections) { + form_state.extra_section = Math.floor(total_without_pillar % section_without_pillar) } else { form_state.extra_section = 0 }