Issue #5523 has been updated by tadayoshi funaba.


????????????????????主???????????????0 ??? 1 ??????????????????????????
???????????????????????????

Common Lisp ??? signum ??????????????????????????????????????????????????
??????????????????????

class Numeric
  def signum
    if self.zero?
      self
    else
      self / self.abs
    end
  end
end

----------------------------------------
Feature #5523: Numeric#sign ?????
http://redmine.ruby-lang.org/issues/5523

Author: tadayoshi funaba
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 2.0


????????????正????Ӧ???????????????????????????????????complex ???
lib/cmath.rb ????中???????????????????????????????????????????????
??????????????????????????????????????

????-1???+1?????????????????????????


-- 
http://redmine.ruby-lang.org