/** * Provides a {@code String} representation of this twist as follows:<br> * Twist of bodyFrame, with respect to baseFrame: [angular = (x, y, z), linear = (x, y, z)] - * expressedInFrame * * @return the {@code String} representing this twist. */ @Override public String toString() { return MecanoIOTools.getTwistString(this); } }
@Override public String toString() { return MecanoIOTools.getTwistString(this); } };
@Override public String toString() { return MecanoIOTools.getTwistString(this); } };
@Override public String toString() { return MecanoIOTools.getTwistString(this); } };
/** * Gets a representative {@code String} of {@code twist} as follows: * * <pre> * Twist of bodyFrame, with respect to baseFrame: [angular = ( 0.174, 0.732, -0.222 ), linear = ( 0.174, 0.732, -0.222 )] - expressedInFrame * </pre> * </p> * * @param twist the object to get the {@code String} of. Not modified. * @return the representative {@code String}. */ public static String getTwistString(TwistReadOnly twist) { return getTwistString(DEFAULT_FORMAT, twist); }
private static void throwNotEqualAssertionError(String messagePrefix, TwistReadOnly expected, TwistReadOnly actual, String format) { String expectedAsString = getTwistString(format, expected); String actualAsString = getTwistString(format, actual); throwNotEqualAssertionError(messagePrefix, expectedAsString, actualAsString, Double.toString(computeNormError(expected, actual))); }
/** * Gets a representative {@code String} of {@code twist} given a specific format to use. * <p> * Using the default format {@link #DEFAULT_FORMAT}, this provides a {@code String} as follows: * * <pre> * Twist of bodyFrame, with respect to baseFrame: [angular = ( 0.174, 0.732, -0.222 ), linear = ( 0.174, 0.732, -0.222 )] - expressedInFrame * </pre> * </p> * * @param format the format to use for each number. * @param twist the object to get the {@code String} of. Not modified. * @return the representative {@code String}. */ public static String getTwistString(String format, TwistReadOnly twist) { if (twist == null) return "null"; else return getTwistString(format, twist.getBodyFrame(), twist.getBaseFrame(), twist.getReferenceFrame(), twist.getAngularPart(), twist.getLinearPart()); }