calc
This commit is contained in:
parent
58b26e4030
commit
3208a401b1
|
@ -94,6 +94,9 @@ const changeParametres = () => {
|
||||||
length = w
|
length = w
|
||||||
} else {
|
} else {
|
||||||
full_sections = Math.floor((total_length_mm - fence_length) / (length + fence_length))
|
full_sections = Math.floor((total_length_mm - fence_length) / (length + fence_length))
|
||||||
|
if (full_sections == 0) {
|
||||||
|
length = total_length_mm - fence_length - fence_length
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((full_sections * length) + (full_sections * fence_length) + fence_length) <= total_length_mm) {
|
if (((full_sections * length) + (full_sections * fence_length) + fence_length) <= total_length_mm) {
|
||||||
|
|
|
@ -14,6 +14,6 @@ export const use_lamelle_color = () => useState<ralTypes>('lamelle_color', () =>
|
||||||
export const use_section_count = () => useState('section_count', () => n)
|
export const use_section_count = () => useState('section_count', () => n)
|
||||||
export const use_extra_section = () => useState('extra_section', () => 0)
|
export const use_extra_section = () => useState('extra_section', () => 0)
|
||||||
export const use_total_length = () => useState('total_length', () => ((min * n) - 100) * 0.001)
|
export const use_total_length = () => useState('total_length', () => ((min * n) - 100) * 0.001)
|
||||||
export const use_min_length = () => useState('min_length', () => 1000)
|
export const use_min_length = () => useState('min_length', () => 700)
|
||||||
export const use_max_size = () => useState<number>('max_size', () => 13)
|
export const use_max_size = () => useState<number>('max_size', () => 13)
|
||||||
export const use_explosion_state = () => useState<boolean>('explosion_state', () => false)
|
export const use_explosion_state = () => useState<boolean>('explosion_state', () => false)
|
Loading…
Reference in New Issue