commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sven Rathgeber (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEOMETRY-29) Plane API cleanup
Date Wed, 13 Mar 2019 13:40:00 GMT

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

Sven Rathgeber commented on GEOMETRY-29:
----------------------------------------

This code is generated by eclipse (Version: 2018-12 (4.10.0)) and following the
recommendations of Joshua Bloch (Effective Java, 3rd Edition).

I don't see the use cases for hashCode and equals for values based on doubles.

I would not put a Vector3D, Line, Plane etc. as key in a Map.
When I compare computed double values, I always use a delta/doublePrecision approach to avoid
the trouble with rounding differences.

WDYT

> Plane API cleanup
> -----------------
>
>                 Key: GEOMETRY-29
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-29
>             Project: Apache Commons Geometry
>          Issue Type: Improvement
>            Reporter: Matt Juntunen
>            Priority: Major
>
> The following changes should be made to the {{o.a.c.g.euclidean.threed.Plane}} class:
>  * make the class immutable
>  * use well-named factory methods instead of constructor overloads
>  * provide a factory method to create a plane with user-supplied {{u}} and {{v}} axes.
The current implementation allows the normal to be provided but chooses its own planar axes
(see {{setFrame}}).
>  * add {{equals}}, {{hashCode}}, and {{toString}} methods.



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

Mime
View raw message