Hello,

The current o.a.c.math.geometry.euclidean packages are inconsistent. The oned and twod packages define respectively Point1D and Point2D classes, with namings akin to affine spaces and the threed package defines a Vector3D class, akin to vector spaces.

I would suggest, for the sake of type safety, to provide in all packages both a PointxD and a VectorxD class, one corresponding to affine spaces and the other one to vectorial spaces. Of course, there would be conversions between the two classes (for example the difference between two points is a vector, adding a vector to a point is a point but adding to vectors is a vector).

This would improve readability, avoid errors and allow overriding some methods (like addition for vectors in the example above) and constructors (like Line(Point, Point) and Line(Point, Vector)).

I need this to have a generic way to build an hyperplane, from a point and a normal vector without types clashing.

What do you think ?

Luc

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to