Guest User

Untitled

a guest
Apr 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. points = Array(1..60)
  2. n = 10
  3.  
  4. less_points = Array(0..n).collect{|i| [i,i * (x.size.to_f / n.to_f).ceil]}
  5.  
  6. # less_points => [[0, 0], [1, 6], [2, 12], [3, 18], [4, 24], [5, 30], [6, 36], [7, 42], [8, 48], [9, 54], [10, 60]]
  7. # 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