[
https://issues.apache.org/jira/browse/NUMBERS-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16342230#comment-16342230
]
Gilles commented on NUMBERS-42:
-------------------------------
Choose a naming in line with current JDK:
* polar(x, y) -> ofPolar(x, y)
* etc.
> Factory methods
> ---------------
>
> Key: NUMBERS-42
> URL: https://issues.apache.org/jira/browse/NUMBERS-42
> Project: Commons Numbers
> Issue Type: New Feature
> Reporter: Gilles
> Priority: Trivial
> Labels: api
> Fix For: 1.0
>
>
> Wherever applicable, provide {{of}} factory methods.
> For example, in "complex.java":
> {code}
> public static Complex ofCartesian(double re, double im) { /*... */ }
> public static Complex ofPolar(double r, double theta) { /*... */ }
> public static Complex ofCis(double theta) { /*... */ }
> {code}
> To be considered: make the constructors private (or protected).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)