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." ) ; } }
Returns the value of a given axis .