Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- points = Array(1..60)
- n = 10
- less_points = Array(0..n).collect{|i| [i,i * (x.size.to_f / n.to_f).ceil]}
- # less_points => [[0, 0], [1, 6], [2, 12], [3, 18], [4, 24], [5, 30], [6, 36], [7, 42], [8, 48], [9, 54], [10, 60]]
- # less_points.should => { 0 => 0, 1 => 6, 2 => 12, 3 => 18, 4 => 24, 5 => 30, 6 => 36, 7 => 42, 8 => 48 ... }?
Add Comment
Please, Sign In to add comment