Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

generate float array in ruby

-1.25.step(by: 0.5, to: 1.25).to_a
# => [-1.25, -0.75, -0.25, 0.25, 0.75, 1.25]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #generate #float #array #ruby
ADD COMMENT
Topic
Name
3+4 =