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

Gilles commented on NUMBERS-80:
-------------------------------

bq. Make constructor protected.

We overlooked that it will perhaps prevent future optimizations (value object). 
 I've just [posted a message to the "dev" 
ML|https://markmail.org/message/tqyyom5zfisgcyag] about this.

Earlier in the [thread|https://markmail.org/message/yy75mzdmjpf7ywwe], you 
indicate that the aim would be to add the following requirements for new 
instances:
# they are unit length, and
# their scalar component is greater than or equal to zero (in order to 
standardize the angles
involved).

The {{normalize}} method fulfills at least the first criterion. And perhaps, 
the other is a convention which can also be adopted for the instance returned 
by this method (?).
If so, would we still need a specialized {{QuaternionRotation}} that is a 
subclass of {{Quaternion}}? IOW, can we use composition (rather than 
inheritance) in order to provide the additional functionality for defining 
rotations and operations with them?

bq. switch the names of the components from q0, q1, q2, q3 to w, x, y, z.

+1


> Quaternion Updates for commons-geometry
> ---------------------------------------
>
>                 Key: NUMBERS-80
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-80
>             Project: Commons Numbers
>          Issue Type: Task
>            Reporter: Matt Juntunen
>            Priority: Blocker
>
> The {{Quaternion}} class should be updated in order to allow the 
> {{QuaternionRotation}} class from commons-geometry to extend it. The 
> following updates are required:
> - Remove {{final}} class modifier.
> - Make constructor protected.
> In addition, it would be good to switch the names of the components from 
> {{q0, q1, q2, q3}} to {{w, x, y, z}}. The former assumes that the convention 
> that the scalar component is always listed first, which is not the case in 
> some domains. The latter convention is not ambiguous.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to