You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2018/03/16 23:01:01 UTC

[jira] [Commented] (NUMBERS-42) Factory methods

    [ https://issues.apache.org/jira/browse/NUMBERS-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16403078#comment-16403078 ] 

Gilles commented on NUMBERS-42:
-------------------------------

Same should be done for class {{Quaternion}}.

> 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)