[
https://issues.apache.org/jira/browse/GEOMETRY-14?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640904#comment-16640904
]
Gilles commented on GEOMETRY-14:
--------------------------------
{quote}A.transform(B).transform(C) would logically perform A, then B, then C.
{quote}
With
[UnaryOperator|https://docs.oracle.com/javase/8/docs/api/java/util/function/UnaryOperator.html],
this would be expressed either as
{code:java}
A.andThen(B).andThen(C)
{code}
or as
{code:java}
C.compose(B).compose(A)
{code}
Using it will bring all the advantages of a standard API.
{quote}{{t.apply(p1.vectorTo(p2)).normalize()}} is more difficult to read.
{quote}
Maybe, but caution still applies for anything that goes into the public API.
The fluent API is nice but we should explore the alternatives.
{quote}I do not have the private fields set as final so that I can do things
like copying
{quote}
This is a can of worms, as it will prevent any simple implementation of
multi-threaded processing.
> AffineTransform?D Classes
> -------------------------
>
> Key: GEOMETRY-14
> URL: https://issues.apache.org/jira/browse/GEOMETRY-14
> Project: Apache Commons Geometry
> Issue Type: New Feature
> Reporter: Matt Juntunen
> Priority: Major
> Labels: pull-request-available
>
> We should create AffineTransform?D classes that implement matrix-based affine
> transforms. They should have simple methods for creating translations,
> rotations, and scaling and calculating the inverse.
>
> Pull Request #1: https://github.com/apache/commons-geometry/pull/14
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)