commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Juntunen (JIRA)" <>
Subject [jira] [Commented] (GEOMETRY-9) New Euclidean Vector Methods
Date Fri, 07 Sep 2018 01:29:00 GMT


Matt Juntunen commented on GEOMETRY-9:

Thanks for the feedback. I don't picture it as nit-picking at all since now, when we don't
have any BC concerns, is the time to try to get it right.

 # GeometryException – This sounds good. I'll go ahead and implement a public GeometryException
class hierarchy. Do you think this should go in this pull request or another one (perhaps
one for GEOMETRY-8)?
 # Vectors class – I'll move this into an internal package for now and add another issue
for moving it into commons-numbers-arrays.
 # Static vector/point methods – Yeah we can ditch these. It would clean up the API considerably
and it's always easier to add something to the API than remove it later on.

> New Euclidean Vector Methods
> ----------------------------
>                 Key: GEOMETRY-9
>                 URL:
>             Project: Apache Commons Geometry
>          Issue Type: Wish
>            Reporter: Matt Juntunen
>            Priority: Minor
> We should add some more methods to the Euclidean vector classes for user convenience
and algorithm clarity.
>  # length() – more intuitive alias for getNorm()
>  # project(Vector) – returns the current vector projected onto the given vector
>  # static project(Vector, Vector) – static version of project
>  # reject(Vector) – returns the current vector projected onto the plane whose normal
is passed to the method (vec equals vec.project(v) + vec.reject(v))
>  # static reject(Vector, Vector) – static version of reject
>  # lerp(Vector, double) – linear interpolation between the current vector and the given
>  # static lerp(Vector, Vector, double) – static version of lerp
>  # withLength(double) – returns the current vector with the given length. This is equivalent
to vector.normalize().scalarMultiply(x) but without the intermediate vector.
> Pull request: []

This message was sent by Atlassian JIRA

View raw message