Actions
Feature #2650
closedVector#/
Feature #2650:
Vector#/
Status:
Closed
Assignee:
-
Target version:
-
Description
=begin
遠藤です。
Matrix#/ や Vector#* があるので Vector#/ もあっていいと思います。
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -1258,6 +1255,20 @@ class Vector
end
end
-
Vector division.¶
- def /(x)
- case x
- when Numeric
-
els = @elements.collect{|e| e / x} -
Vector.elements(els, false) - else
-
s, x = x.coerce(self) -
s / x - end
- end
- #--
VECTOR FUNCTIONS¶
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
--
Yusuke ENDOH mame@tsg.ne.jp
=end
Actions