Affine transforms - matrix algebra

Pedro Duque Vieira pedro.duquevieira at
Mon Aug 13 09:26:54 PDT 2012

Hi Pavel,

     public Point3D add(Point3D point)
>          // Creates a point with distances from origin added (adds two
> vectors)
>      public Point3D subtract(Point3D point)
>          // Creates a point with the given point's distances from origin
> subtracted
>          // (subtracts two vectors)
>      public Point3D normalize()
>          // Gets a point in the same direction from the origin with
> distance from the origin equal to one
>          // (normalizes a vector)
>    ? should the above three methods be named getSomething to stress that
> the operation doesn't modify the object?

Yes, I think it's better to call them getSomething.

 public double getLength()
>          // Gets distance from the origin (lenght of a vector)

I'd prefer getMagnitude(), this way it's obvious your getting the lenght of
a vector

Your missing:
- getAngle()
// gets the angle of the vector
- getType
// returns whether this represents a vector or a point

Your missing on matrix or affine:
- transpose()
// transposes the matrix

Thanks, best regards,

Pedro Duque Vieira

More information about the openjfx-dev mailing list