view util/mathcompat.lua @ 13159:706f7d1affc2

mod_storage_sql: Fix column name in index check for PostgreSQL Forgot to change the column name in 9a7523ea45cb
author Kim Alvefur <zash@zash.se>
date Sat, 17 Jun 2023 13:37:33 +0200
parents 8815d3090928
children
line wrap: on
line source

if not math.type then

	local function math_type(t)
		if type(t) == "number" then
			if t % 1 == 0 and t ~= t + 1 and t ~= t - 1 then
				return "integer"
			else
				return "float"
			end
		end
	end
	_G.math.type = math_type
end