@Override public String toString() { return MecanoIOTools.getWrenchString(this); } };
@Override public String toString() { return MecanoIOTools.getWrenchString(this); } };
@Override public String toString() { return MecanoIOTools.getWrenchString(this); } };
/** * Provides a {@code String} representation of this spatial force vector as follows:<br> * Wrench exerted on bodyFrame: [angular = (x, y, z), linear = (x, y, z)] - expressedInFrame * * @return the {@code String} representing this spatial force vector. */ @Override public String toString() { return MecanoIOTools.getWrenchString(this); } }
/** * Gets a representative {@code String} of {@code wrench} as follows: * * <pre> * Wrench exerted on bodyFrame: [angular = ( 0.174, 0.732, -0.222 ), linear = ( 0.174, 0.732, -0.222 )] - expressedInFrame * </pre> * </p> * * @param wrench the object to get the {@code String} of. Not modified. * @return the representative {@code String}. */ public static String getWrenchString(WrenchReadOnly wrench) { return getWrenchString(DEFAULT_FORMAT, wrench); }
private static void throwNotEqualAssertionError(String messagePrefix, WrenchReadOnly expected, WrenchReadOnly actual, String format) { String expectedAsString = getWrenchString(format, expected); String actualAsString = getWrenchString(format, actual); throwNotEqualAssertionError(messagePrefix, expectedAsString, actualAsString, Double.toString(computeNormError(expected, actual))); }
/** * Gets a representative {@code String} of {@code wrench} given a specific format to use. * <p> * Using the default format {@link #DEFAULT_FORMAT}, this provides a {@code String} as follows: * * <pre> * Wrench exerted on bodyFrame: [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 wrench the object to get the {@code String} of. Not modified. * @return the representative {@code String}. */ public static String getWrenchString(String format, WrenchReadOnly wrench) { if (wrench == null) return "null"; else return getWrenchString(format, wrench.getBodyFrame(), wrench.getReferenceFrame(), wrench.getAngularPart(), wrench.getLinearPart()); }