Module:MOS: Difference between revisions

Inthar (talk | contribs)
No edit summary
Inthar (talk | contribs)
No edit summary
Line 171: Line 171:
             current_L = current_L + 1
             current_L = current_L + 1
end
end
     if current_L < a or current_s < b then -- check to exclude (current_L, current_s) = (a, b)
     if current_L < nL or current_s < ns then -- check to exclude (current_L, current_s) = (nL, ns)
     local distance_here = math.abs(a*current_s - b*current_L)/math.sqrt(a^2 + b^2)
     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