Method: Array#squared
- Defined in:
- lib/cosmos/core_ext/array.rb
#squared ⇒ Object
return [Array] A new array with each value of the original squared
245 246 247 |
# File 'lib/cosmos/core_ext/array.rb', line 245 def squared self.map { |value| value * value } end |