in reply to Constructing complex numbers using recursion
Based on what you've shown, it looks like the value being passed to the "recursed" constructComplex (i.e. the return value from PolarToRect) might be incorrect in some way -- but there's really no way to be sure, because the OP has left out some important parts.
(Like: when "$magnitude = blah", does this mean that it gets the part of a string that precedes " _ "? and similarly for "$angle = blah"?)
update: for that matter, I'm having trouble understanding why "constructComplex" is calling itself at all here... if the coordinates are "inPolarForm", why do you need to convert to rectangular and then back to polar?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Constructing complex numbers using recursion
by moltar512 (Sexton) on Nov 08, 2005 at 04:51 UTC |