infusion / Complex.js

Complex.js is a com numbers library written in JavaScript
https://raw.org/article/complex-numbers-in-javascript/
MIT License
232 stars 33 forks source link

Parse() correctly handles polar complex with infinite magnitude. #23

Closed harrysarson closed 6 years ago

harrysarson commented 6 years ago

Improves the parse function so that now parse{r: Infinity, phi: x}) where x is any finite Number will return ComplexInfinity rather than ComplexNaN.

If x is infinite or NaN then parse will return ComplexNaN.

Also adds tests for these cases and duplicates any tests using {r, phi} to also run using {abs, arg}