Dot product: Difference between revisions
→{{header|Ruby}}: use sum method
(→{{header|Raku}}: create a subroutine) |
(→{{header|Ruby}}: use sum method) |
||
Line 2,876:
def dot_product(other)
raise "not the same size!" if self.length != other.length
end
end
|