Category talk:Wren-complex: Difference between revisions
→Source code: Added methods to test for integerness.
(Added description and source code for new 'Wren-complex' module.) |
(→Source code: Added methods to test for integerness.) |
||
Line 151:
isInfinity { _real.isInfinity || _imag.isInfinty } // true if either part is infinite
isNan { _real.isNan || imag.isNan } // true if either part is nan
// Returns whether real component is an integer and imaginary component is zero.
isRealInteger { _real.isInteger && _imag == 0 }
// Returns whether imaginary component is an integer and real component is zero.
isImagInteger { _imag.isInteger && _real == 0 }
// Returns the ordered pair [_real, _imag].
|