commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Juntunen (JIRA)" <>
Subject [jira] [Commented] (GEOMETRY-23) Remove Euclidean Point Classes
Date Wed, 24 Oct 2018 03:52:00 GMT


Matt Juntunen commented on GEOMETRY-23:

I was thinking somewhat along the same lines but from a different direction. I thought we
could keep {{Vector3D}} as-is but document that it represents points and vectors in Cartesian
coordinates. Then, we could rename {{ofSpherical}} to {{fromSpherical}} to emphasize the fact
that a conversion is being made in the coordinate values. I see your point on the self-documenting
code aspect but I don't want to lose the conciseness of the API and its similarity to other
geometry libraries.

> Remove Euclidean Point Classes
> ------------------------------
>                 Key: GEOMETRY-23
>                 URL:
>             Project: Apache Commons Geometry
>          Issue Type: Improvement
>            Reporter: Matt Juntunen
>            Priority: Major
>              Labels: pull-request-available
> Based on discussion of the current Point/Vector API in GEOMETRY-14 and research into
other geometric libraries, I think we should remove the Euclidean Point?D classes and make
Vector?D also implement Point. This will end up being similar to the previous commons-math
design but avoids the issue raised in MATH-1284 since the Point and Vector interfaces are
not related. They just happen to be implemented by the same class, which we're calling Vector?D
since a vector can be used to indicate a point (by adding it to the origin).
> In the course of trying this out this design, I ended up removing 7 classes and simplifying
several methods. I think that's a good indicator that this is a good design choice.
> Pull request:

This message was sent by Atlassian JIRA

View raw message