gaboshlib/g_num_is_approx.sh aktualisiert

This commit is contained in:
olli 2023-11-03 14:52:34 +01:00
parent 301bcde417
commit 09c821e824

View File

@ -10,8 +10,8 @@ function g_num_is_approx {
g_num_valid_number "${f_num}" "${f_base}" "${f_percentage_up}" "${f_percentage_down}" || return 1 g_num_valid_number "${f_num}" "${f_base}" "${f_percentage_up}" "${f_percentage_down}" || return 1
local f_from=$(echo "${f_base} - (${f_base} / 100 * ${f_percentage_down})" | bc -l) local f_from=$(g_calc "${f_base} - (${f_base} / 100 * ${f_percentage_down})")
local f_to=$(echo "${f_base} + (${f_base} / 100 * ${f_percentage_up})" | bc -l) local f_to=$(g_calc "${f_base} + (${f_base} / 100 * ${f_percentage_up})")
g_num_is_between ${f_num} ${f_from} ${f_to} g_num_is_between ${f_num} ${f_from} ${f_to}
} }