[Feature:trunk] Vector#/

e$B1sF#$G$9!#e(B

Matrix#/ e$B$de(B Vector#* e$B$,$"$k$N$Ge(B Vector#/
e$B$b$"$C$F$$$$$H;W$$$^$9!#e(B

— 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

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:40151] the message: “[ruby-dev:40151] [Feature:trunk]
Vector#/”, on Jan/26 00:24(JST) Yusuke ENDOH writes:

e$B1sF#$G$9!#e(B

Matrix#/ e$B$de(B Vector#* e$B$,$"$k$N$Ge(B Vector#/ e$B$b$"$C$F$$$$$H;W$$$^$9!#e(B

e$B$^$“e(B, e$B$”$C$F$b$h$$$H;W$$$^$9e(B. e$B$,e(B,
e$BDj5A$,e(B, [ruby-dev:40150] e$B$N<gD%$K$=$C$F$J$$$H;W$$$^$9$,e(B?

__
---------------------------------------------------->> [email protected](B
e$B7=<ye(B <<—
---------------------------------->> e-mail: [email protected] <<—

e$B%A%1%C%He(B #2650 e$B$,99?7$5$l$^$7$?!#e(B (by Keiju Ishitsuka)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

This issue was solved with changeset r26448.
Yusuke, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


http://redmine.ruby-lang.org/issues/show/2650

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs