changeset 9783 | 1e6b91080bfc |
parent 9782 | 6c3cad32d4f4 |
child 9802 | 00216d609140 |
9782:6c3cad32d4f4 | 9783:1e6b91080bfc |
---|---|
116 if first:len() > 0 then |
116 if first:len() > 0 then |
117 table.insert(res, tonumber(first)) |
117 table.insert(res, tonumber(first)) |
118 end |
118 end |
119 return res |
119 return res |
120 end |
120 end |
121 |
|
122 -- returns the distance of 2 gears |
|
123 function distance(gear1, gear2) |
|
124 local dist = math.sqrt(math.pow((GetX(gear1) - GetX(gear2)),2) + math.pow((GetY(gear1) - GetY(gear2)),2)) |
|
125 return dist |
|
126 end |