fix local issue with real numbers

This commit is contained in:
2026-08-11 16:10:50 +02:00
parent 99dc9a4ef5
commit 82b9e6bf2f
+4 -4
View File
@@ -134,10 +134,10 @@ _rain_normalize_speed()
return 1 return 1
fi fi
if awk -v s="$raw_speed" 'BEGIN { exit !(s < 1) }'; then if LC_ALL=C awk -v s="$raw_speed" 'BEGIN { exit !(s < 1) }'; then
printf "%s" "$raw_speed" printf "%s" "$raw_speed"
else else
awk -v s="$raw_speed" 'BEGIN { printf "%.3f", s / 100 }' LC_ALL=C awk -v s="$raw_speed" 'BEGIN { printf "%.3f", s / 100 }'
fi fi
} }
@@ -253,10 +253,10 @@ _rain_engine()
# Adapt cadence and density to terminal size for smoother rendering. # Adapt cadence and density to terminal size for smoother rendering.
if ((term_area < 1200)); then if ((term_area < 1200)); then
((max_rain_width = term_area / 4)) ((max_rain_width = term_area / 4))
frame_sleep=$(awk -v s="$step_duration" 'BEGIN { printf "%.3f", s * 1.15 }') frame_sleep=$(LC_ALL=C awk -v s="$step_duration" 'BEGIN { printf "%.3f", s * 1.15 }')
elif ((term_area > 5000)); then elif ((term_area > 5000)); then
((max_rain_width = term_area / 2)) ((max_rain_width = term_area / 2))
frame_sleep=$(awk -v s="$step_duration" 'BEGIN { printf "%.3f", s * 0.85 }') frame_sleep=$(LC_ALL=C awk -v s="$step_duration" 'BEGIN { printf "%.3f", s * 0.85 }')
else else
frame_sleep="$step_duration" frame_sleep="$step_duration"
fi fi