Skip to content

Commit

Permalink
refactor: Apply Lua "min" profile without math.pow
Browse files Browse the repository at this point in the history
Not a fix as it exists in Lua 5.1 to 5.4 at the time of writing,
but is marked deprecated in Lua 5.3...
  • Loading branch information
Omikhleia authored and Didier Willis committed Dec 8, 2023
1 parent 0282e4a commit 672b1bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/framebox/graphics/rough.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ local function _offsetOpt(x, ops, roughnessGain)
end

local function _line(x1, y1, x2, y2, o, move, overlay) -- returns an array of operations
local lengthSq = math.pow((x1 - x2), 2) + math.pow((y1 - y2), 2)
local lengthSq = (x1 - x2)^2 + (y1 - y2)^2
local length = math.sqrt(lengthSq)
local roughnessGain
if length < 200 then
Expand Down

0 comments on commit 672b1bc

Please sign in to comment.