lib/tracksperanto/zip_tuples.rb in tracksperanto-1.6.2 vs lib/tracksperanto/zip_tuples.rb in tracksperanto-1.6.3
- old
+ new
@@ -6,9 +6,10 @@
#
# zip_curve_tuples( [[0, 12], [1, 23]], [[1, 12]]) #=> [[1, 23, 12]]
#
def zip_curve_tuples(*curves)
tuples = []
+
curves.each do | curve |
curve.each do | keyframe |
frame, value = keyframe
tuples[frame] ? tuples[frame].push(value) : (tuples[frame] = [frame, value])
end