instance method Complex#==
self == c -> bool
-
数値として等しいか判定します。
- [PARAM] c:
- 自身と比較する数値
例:
z1 = Complex.new(1, 2) z2 = Complex.new(1, 0) z3 = Complex.new(0, 1) p z1 == Complex.new(1, 2) #=> true p z1 == z2 #=> false p z2 == 1.0 #=> true p z3 == Complex::I #=> true
class Complex