calc
This commit is contained in:
parent
36d77b3e22
commit
aa329dd2a0
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue