From b3530d7c4a102935fa26498a160ee1dc6c1e9c03 Mon Sep 17 00:00:00 2001 From: delta Date: Fri, 4 Jul 2025 00:38:29 +0200 Subject: :3 --- .config/awesome/quarrel/math.lua | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .config/awesome/quarrel/math.lua (limited to '.config/awesome/quarrel/math.lua') diff --git a/.config/awesome/quarrel/math.lua b/.config/awesome/quarrel/math.lua deleted file mode 100644 index b16547b..0000000 --- a/.config/awesome/quarrel/math.lua +++ /dev/null @@ -1,31 +0,0 @@ -local gmath = require "gears.math" - ----@class QuarrelMath -local qmath = {} - --- TODO: Finish documenting these functions - -function qmath.step_value(value, steps) - if value > steps[#steps - 1][1] then - return steps[#steps - 1][2] - end - for i, step in ipairs(steps) do - if step[1] <= value and value <= steps[i + 1][1] then - return step[2] - end - end -end - -function qmath.translate_range(value, in_min, in_max, out_min, out_max) - return out_min + ((out_max - out_min) / (in_max - in_min)) * (value - in_min) -end - -function qmath.percentage(value, max) - return gmath.round(value / max * 100) -end - -function qmath.clamp(value, min, max) - return math.max(math.min(value, max), min) -end - -return qmath -- cgit v1.2.3