/** * Gets the direction of the axis along the given {@link AxisDirection}. * * @param axis The axis * @param direction The direction along the axis * @return The direction */ public static Direction getFromAxis(final Axis axis, final AxisDirection direction) { switch (direction) { case PLUS: return getFromAxis(axis); case ZERO: return NONE; case MINUS: return getFromAxis(axis).getOpposite(); default: throw new IllegalArgumentException(axis.name()); } }
/** * Gets the direction of the axis along the given {@link AxisDirection}. * * @param axis The axis * @param direction The direction along the axis * @return The direction */ public static Direction getFromAxis(final Axis axis, final AxisDirection direction) { switch (direction) { case PLUS: return getFromAxis(axis); case ZERO: return NONE; case MINUS: return getFromAxis(axis).getOpposite(); default: throw new IllegalArgumentException(axis.name()); } }