I will paraphrase what it does, and maybe you can help me figure out why its crashing/giving me an infinite loop
Well, it's hard figure out what's really going on from a "paraphrase" but if there is infinite loop, it's probably because constructComplex() calls itself recursively and the conditions that mediate the recusion do not change.
Here's my advice though: use Math::Trig. It has routines that convert from/to polar coordinates and a whole lot more.
In reply to Re: Constructing complex numbers using recursion
by duff
in thread Constructing complex numbers using recursion
by moltar512
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |