Category talk:Wren-complex: Difference between revisions
→Source code: Broadened the scope of the division and equality operators.
(→Source code: Negative zero woes :() |
(→Source code: Broadened the scope of the division and equality operators.) |
||
Line 190:
}
/(o) {
o = Complex.check_(o)
var i = o.inverse
return Complex.new_(
_real * i.real - _imag * i.imag,
_real * i.imag + _imag * i.real
)
}
// Returns the absolute value or modulus of this instance.
Line 301 ⟶ 308:
// Equality operators.
==(o) {
o = Complex.check_(o)
return _real == o.real && _imag == o.imag
}
!=(o) { !(this == o) }
|