This commit is contained in:
Kseninia Mikhaylova 2024-06-18 12:21:25 +03:00
parent 36d77b3e22
commit aa329dd2a0
1 changed files with 3 additions and 3 deletions

View File

@ -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
}