summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-25 01:23:29 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-26 16:10:24 +0900
commit295fdeb0866060b1ef2e64fecd7240d94f0d652f (patch)
tree9d5a6d8f9f2f37803c837c9b539d085b480028f1
parent909c4d771142a7adc6f905f95f4a3d2e66abcc5f (diff)
downloadmpv-295fdeb0866060b1ef2e64fecd7240d94f0d652f.tar.bz2
mpv-295fdeb0866060b1ef2e64fecd7240d94f0d652f.tar.xz
lua: do not use math.pow()
It's the first thing that breaks with Lua 5.3. I don't know if there are other failures because I don't care enough.
-rw-r--r--player/lua/assdraw.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/assdraw.lua b/player/lua/assdraw.lua
index fc3b727f57..81b1ca403f 100644
--- a/player/lua/assdraw.lua
+++ b/player/lua/assdraw.lua
@@ -21,7 +21,7 @@ function ass_mt.draw_stop(ass)
end
function ass_mt.coord(ass, x, y)
- local scale = math.pow(2, ass.scale - 1)
+ local scale = 2 ^ (ass.scale - 1)
local ix = math.ceil(x * scale)
local iy = math.ceil(y * scale)
ass.text = string.format("%s %d %d", ass.text, ix, iy)