The correct way to mirror an angle in [-PI, PI] around the x-axis is simply to
negate it, which doesn't seem ceremonious enough to require a utility method.
The old mirrorAngle mirrors around the "y-axis" (PI/2 or -PI/2 as appropriate)
which is necessary for other code (particularly angularDifference) to work
correctly. The new mirrorAngleOrigin mirrors around the "x-axis" (zero).
- nixed all transforms except identity and affine; the intermediate transforms
were more trouble than they were worth
- fixed bugs in AffineTransform.translate/scaleX/scaleY/rotate; aiya!
- replaced Transform.clone with Transform.copy; deprecated clone
- rewrote transform test in Scala and using Java AffineTransform as a
reference.
- Moved Vector.direction to Point.direction as that makes more sense. If you
want to know the angle of the vector between two points, you should do that
on points, not vectors.
- Added Vector.angle() which returns the angle of the vector (in polar
coordinates), which matches Vector.length() which returns the magnitude of
the vector (in polar coordinates).
- Added Vectors.fromPolar to create a vector from polar coordinates, and added
Vector.setLength and Vector.setAngle to set the one whilst preserving the
other.
As Tim points out, vector multiplication implies dot or cross products. These
methods are scaling, not multiplying. Cross product coming in a future commit.
We now have a Transform interface and a bevy of implementations of varying
generality: identity, rigid body, uniform scaling, non-uniform scaling, and
affine.
Along the way, Vector was added, APIs were tidied up, bits were twiddled, but
no platonic shapes were harmed.