Skip to content

Commit

Permalink
Cosmetics.
Browse files Browse the repository at this point in the history
  • Loading branch information
markmaker committed May 10, 2020
1 parent b36f6e9 commit 80117eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/openpnp/spi/base/AbstractHeadMountable.java
Expand Up @@ -209,7 +209,8 @@ public Location toRaw(Location location, LocationOption... options) {
// at the last stage. Given this simplification we can solve the inverse by inverting the
// 5D Affine Transform Matrix.

// Query each axis for an Affine Transform vector.
// Query each axis for an Affine Transform vector. Will just return the unit vector if not
// a linear transformation.
double [][] affineTransform = new double [][] {
AbstractTransformedAxis.getLinearTransform(axisX, location.getUnits()),
AbstractTransformedAxis.getLinearTransform(axisY, location.getUnits()),
Expand All @@ -221,7 +222,7 @@ public Location toRaw(Location location, LocationOption... options) {
// Compute the inverse.
double [][] invertedAffineTransform = Matrix.inverse(affineTransform);

// We provide the inverted Affine Tranform for those axes that actually do the linear transform.
// We provide the inverted Affine Tranform for use by those axes that actually do the linear transform.
double x = AbstractTransformedAxis.toRaw(axisX, location, invertedAffineTransform);
double y = AbstractTransformedAxis.toRaw(axisY, location, invertedAffineTransform);
double z = AbstractTransformedAxis.toRaw(axisZ, location, invertedAffineTransform);
Expand Down Expand Up @@ -268,8 +269,7 @@ public Location getApproximativeLocation(Location currentLocation, Location desi
}
}
// Now convert it back NOT applying any options, i.e. when a moveTo() is later made,
// effectively reversing the option-less transformation, the result will be the same.
// The approximation will in effect be applied.
// it will effectively reverse the option-less transformation and end up in the desired approximative location.
Location headApproximativeLocation = toTransformed(desiredRawLocation);
Location approximativeLocation = toHeadMountableLocation(headApproximativeLocation);
return approximativeLocation;
Expand Down

0 comments on commit 80117eb

Please sign in to comment.