Diff

util/human/units.lua @ 12573:0f4feaf9ca64

util: Remove various Lua 5.1 compatibility hacks Part of #1600
author Kim Alvefur <zash@zash.se>
date Sat, 02 Jul 2022 17:31:14 +0200
parent 10903:c5f26f9adb31
child 12589:39ae08180c81
line wrap: on
line diff
--- a/util/human/units.lua	Sat Jul 02 17:30:34 2022 +0200
+++ b/util/human/units.lua	Sat Jul 02 17:31:14 2022 +0200
@@ -6,14 +6,6 @@
 local math_min = math.min;
 local unpack = table.unpack or unpack; --luacheck: ignore 113
 
-if math_log(10, 10) ~= 1 then
-	-- Lua 5.1 COMPAT
-	local log10 = math.log10;
-	function math_log(n, base)
-		return log10(n) / log10(base);
-	end
-end
-
 local large = {
 	"k", 1000,
 	"M", 1000000,