code: private double getValue(final double x, final double y, final double z,
              final Axis axis) {
          switch (axis) {
              case X:
                  return x;
              case X_INVERTED:
                  return -x;
              case Y:
                  return y;
              case Y_INVERTED:
                  return -y;
              case Z:
                  return z;
              case Z_INVERTED:
                  return -z;
              default:
                  throw new IllegalArgumentException("Unsupported axis.");
          }
      }
docs: Returns the value of a given axis.
  @param x Input x value.
  @param y Input y value.
  @param z Input z value.
  @param axis Axis to return.
  @return The value of a given axis.