From: Sakuro OZAWA Date: 2011-06-27T10:48:06+09:00 Subject: [ruby-dev:43957] [Ruby 1.9 - Feature #4891] Vector#normalize Issue #4891 has been updated by Sakuro OZAWA. =begin Just for curiosity's sake, what is expected from Vector[0,0,0].normalize ? * (()) says: the zero vector cannot be normalized. * The patch gives Vector[NaN, NaN, NaN]. * returns (dup of) self? * domain error? =end ---------------------------------------- Feature #4891: Vector#normalize http://redmine.ruby-lang.org/issues/4891 Author: Kenta Murata Status: Assigned Priority: Normal Assignee: Marc-Andre Lafortune Category: lib Target version: 1.9.3 知人からベクトルを正規化するメソッドが無いよと言われました。 いままで誰も気付かなかった (もしくは気付いても放っておいた) のですが、 存在してて当然のメソッドのような気がするので追加の提案をします。 パッチはこれです。 https://gist.github.com/1029140 -- http://redmine.ruby-lang.org