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

Matt Juntunen commented on GEOMETRY-27:
---------------------------------------

I just had another thought on this, related to the changes that were just 
merged: {{equals}} and {{hashCode}} check for strict equality due to the 
requirements for those methods. However, it might be good to add a method that 
does a fuzzy comparison based on the precision of the {{OrientedPoint}} 
instance, similar to how {{Vector1D.equals(Vector1D, DoublePrecisionContext)}} 
works. In this case, though, we can't override the {{equals}} method since the 
precision context is already part of the instance. So, two questions here:
 1. Should we add a fuzzy comparison method? (I think, probably yes)
 2. If so, what should the name be? {{eq()}} like in 
{{DoublePrecisionContext}}? If we do make a change here, then the overridden 
{{Vector?D}} fuzzy comparison methods should probably be updated to match.

What do you think, [~erans]?

> OrientedPoint API Cleanup
> -------------------------
>
>                 Key: GEOMETRY-27
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-27
>             Project: Apache Commons Geometry
>          Issue Type: Wish
>            Reporter: Matt Juntunen
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The following changes should be made to the {{OrientedPoint}} class:
>  - replace {{direct}} boolean with {{direction}} {{Vector1D}} instance. The 
> "direct" terminology is not clear to most users and having a vector to 
> indicate the orientation of the point is much more intuitive and easier to 
> work with.
>  - add {{equals}}, {{hashCode}}, and {{toString}}
>  - make the class immutable.
>  - update documentation to be more accessible.
>  
> Pull request: https://github.com/apache/commons-geometry/pull/27



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

Reply via email to