summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/bright4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/bright b/bin/bright
index dd8f2df..791e0df 100755
--- a/bin/bright
+++ b/bin/bright
@@ -12,7 +12,7 @@ get_b()
b=$(brightnessctl --class=backlight get) || return 1
printf '%.0f\n' $(printf \
- 'scale = 4;'$(: \
+ 'scale = 20;'$(: \
)'((%d - 1) * sqrt((%d - %d) * (%d - (2 * %d - %d)))) / '$(: \
)'(%d - %d)\n' \
${STEPS} ${MIN} ${b} ${b} ${max} ${MIN} ${max} ${MIN} | bc)
@@ -26,7 +26,7 @@ set_b()
shift 1
brightnessctl --class=backlight set $(printf '%.0f\n' $(printf \
- 'scale = 4;'$(: \
+ 'scale = 20;'$(: \
)'%d + (1 - sqrt(1 - (%d / (%d - 1))^2)) * (%d - %d)\n' \
${MIN} ${b} ${STEPS} ${max} ${MIN} | bc)) || return 1