Project

General

Profile

Actions

Feature #5523

closed

Numeric#sign の追加

Added by tadf (tadayoshi funaba) over 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
Target version:
[ruby-dev:44722]

Description

負の零なども含め正しく符号を判断するために必要です。実際、complex や
lib/cmath.rb などの中ではこのような判断が必要ですが、標準では提供されて
いないため、不自然なものになっています。

値は-1か+1のいずれかになります。


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #2968: 数値の正負を返すメソッドRejectedmrkn (Kenta Murata)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0