Method: Stick::Vector#coerce
- Defined in:
- lib/stick/matrix/core.rb
#coerce(other) ⇒ Object
FIXME: describe Vector#coerce.
1376 1377 1378 1379 1380 1381 1382 1383 |
# File 'lib/stick/matrix/core.rb', line 1376 def coerce(other) case other when Numeric return Matrix::Scalar.new(other), self else raise TypeError, "#{self.class} can't be coerced into #{other.class}" end end |