# File Springz.rb, line 136 def Springz.apply_all( iterations=1, avoid_collisions=true ) avoid_collsions = !!avoid_collisions iterations=iterations.to_i t0 = Time.new iterations.times { |i| @@all.each{ |spring| spring.apply( avoid_collisions ) unless spring.disabled } prevent_collisions if avoid_collisions } t3 = Time.new #$stderr.puts "Applied #{@@all.length} Springz #{iterations} times #{avoid_collisions ? '(avoiding collisions) ' : ''}in in #{(t3-t0).round_to(2)} seconds" unless iterations==1 end