smalos / nubuilder_dev

function or var declarations in nested blocks is not preferred JS-0016
Bug risk
Major
1 occurrence in this check
Move function declaration to function body root.
 3326
 3327            // equations of right and left sides, returns x, y values given height of section (y value and 2 points)
 3328
 3329            function findedge (l, p1, p2) { 3330              const m = (p1[1] - p2[1]) / (p1[0] - p2[0]) 3331              const b = p1[1] - m * p1[0] 3332              const y = l + p1[1] 3333 3334              return [(y - b) / m, y] 3335            } 3336
 3337            // check each section
 3338            lex = findedge(y, vfirst[0], vlast[3])