From a8e883b8eca7763f49af47447d8b5a9b47284094 Mon Sep 17 00:00:00 2001 From: Maik Wild Date: Tue, 2 Oct 2018 10:08:57 +0200 Subject: [PATCH] added math.sqrt2 --- control.lua | 2 +- utils/{math_fix.lua => math.lua} | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) rename utils/{math_fix.lua => math.lua} (85%) diff --git a/control.lua b/control.lua index 3fe0f89f..98a1e3f6 100644 --- a/control.lua +++ b/control.lua @@ -1,7 +1,7 @@ require 'config' require 'utils.utils' require 'utils.list_utils' -require 'utils.math_fix' +require 'utils.math' local Game = require 'utils.game' diff --git a/utils/math_fix.lua b/utils/math.lua similarity index 85% rename from utils/math_fix.lua rename to utils/math.lua index 2ee9630b..a0ed112a 100644 --- a/utils/math_fix.lua +++ b/utils/math.lua @@ -5,7 +5,10 @@ math.sin = function(x) return math.floor(_sin(x) * 10000000 + 0.5) / 10000000 end - math.cos = function(x) return math.floor(_cos(x) * 10000000 + 0.5) / 10000000 end + +math.sqrt2 = math.sqrt(2) + +return math