find_beads 0.9.2-java → 0.9.3-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/find_beads/version.rb +1 -1
- data/lib/find_beads.rb +7 -1
- metadata +1 -1
data/lib/find_beads/version.rb
CHANGED
data/lib/find_beads.rb
CHANGED
@@ -124,11 +124,17 @@ module FindBeads
|
|
124
124
|
|
125
125
|
closest_index = i
|
126
126
|
|
127
|
+
elsif dist < next_dist then
|
128
|
+
|
129
|
+
next_dist = dist
|
130
|
+
|
131
|
+
next_index = i
|
132
|
+
|
127
133
|
end
|
128
134
|
|
129
135
|
end
|
130
136
|
|
131
|
-
cutoff =
|
137
|
+
cutoff = 1.01*Math.sqrt(2)
|
132
138
|
|
133
139
|
if next_dist - closest_dist < cutoff then
|
134
140
|
|