orbisgis / cts

Projection library in Java
GNU Lesser General Public License v3.0
49 stars 15 forks source link

Rework Complex creation and add test #133

Closed SPalominos closed 4 years ago

SPalominos commented 4 years ago

Marks some existing methods as deprecated and add new methods to have a more consistent syntax. Changes how the complex number are created. In order to have the same syntax for the creation from cartesian an polar coordinates, the creation :

new Complex(double, double); //For cartesian (x, y) coordinates
Complex.createComplexFromRA(double, double); //For polar (r, φ) coordinates

is replaced by

Complex.cartesian(double, double);
Complex.polar(double, double);

The method Complex.times() is also replaced by Complex.multiplyBy() in order to have the same syntax as the existing method Complex.divideBy().