Method: Matrix::Scalar#+
- Defined in:
- lib/matrix.rb
#+(other) ⇒ Object
ARITHMETIC
1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 |
# File 'lib/matrix.rb', line 1844 def +(other) case other when Numeric Scalar.new(@value + other) when Vector, Matrix raise ErrOperationNotDefined, ["+", @value.class, other.class] else apply_through_coercion(other, __method__) end end |