binpack 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/binpack.rb +0 -11
- data/lib/binpack/version.rb +1 -1
- metadata +1 -1
data/lib/binpack.rb
CHANGED
@@ -75,14 +75,3 @@ module Binpack
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
78
|
-
|
79
|
-
items = []
|
80
|
-
12.times do |i|
|
81
|
-
items << Binpack::Item.new("Associated object #{i+1}", (rand(10)+2)/2.0, (rand(10)+2)/2.0)
|
82
|
-
end
|
83
|
-
|
84
|
-
# Pack the array of items into a bin where the default bin size is 16x10 with a padding of 1
|
85
|
-
bins = Binpack::Bin.pack(items, [], Binpack::Bin.new(16, 10, 1))
|
86
|
-
|
87
|
-
puts bins.join("\n\n")
|
88
|
-
puts bins[0].items.inspect
|
data/lib/binpack/version.rb
CHANGED