Method: PlotStatistics::ClamPlot.create_regular
- Defined in:
- lib/plot_statistics/clam_plot.rb
.create_regular(distance = 5) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/plot_statistics/clam_plot.rb', line 40 def self.create_regular(distance=5) clams = [] (0..100).each do |x| (0..100).each do |y| mod_x = x % distance mod_y = y % distance clams << Clam.new(:x => x, :y => y) if mod_x == 0 && mod_y == 0 end end new(clams) end |