Module:MOS: Difference between revisions
No edit summary |
No edit summary |
||
| Line 171: | Line 171: | ||
current_L = current_L + 1 | current_L = current_L + 1 | ||
end | end | ||
if current_L < | if current_L < nL or current_s < ns then -- check to exclude (current_L, current_s) = (nL, ns) | ||
local distance_here = math.abs( | local distance_here = math.abs(nL*current_s - ns*current_L)/math.sqrt(nL^2 + ns^2) | ||
if distance_here < min_dist then | if distance_here < min_dist then | ||
min_dist = distance_here | min_dist = distance_here | ||