commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject [math] Complex nth roots
Date Thu, 01 Jan 2009 23:27:36 GMT
Thanks, Bernhard for the contribution in MATH-236.  I would like to 
suggest a couple of improvements.

First, I think the return type should be List, not Collection, as there 
is an order to the elements in the returned collection (as stated in the 
API doc, the order is by increasing argument).

Second,  since we are also making the method that returns the argument 
public, I would prefer to name that "getArgument" (preferred) or 
"getArg" instead of "getPhi".

Finally,  in the loop that generates the roots, it would be better to 
compute the pie slice once and then add it each time instead of 
computing k* 2 * Math.PI/ n for each k > 1.

If there are no objections, I will make these changes.

Thanks again for the contribution.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message