/** * Gets a representative {@code String} of {@code spatialInertia} as follows: * * <pre> * Spatial inertia of bodyFrame expressed in World: * / 0.253, 0.000, 0.000, 0.000, 0.554, -0.247 \ * | 0.000, 0.994, 0.000, -0.554, 0.000, 0.387 | * | 0.000, 0.000, 0.084, 0.247, -0.387, 0.000 | * | 0.000, -0.554, 0.247, 0.773, 0.000, 0.000 | * | 0.554, 0.000, -0.387, 0.000, 0.773, 0.000 | * \-0.247, 0.387, 0.000, 0.000, 0.000, 0.773 / * </pre> * * @param spatialInertia the object to get the {@code String} of. Not modified. * @return the representative {@code String}. */ public static String getSpatialInertiaString(SpatialInertiaReadOnly spatialInertia) { return getSpatialInertiaString(DEFAULT_FORMAT, spatialInertia); }
/** * Provides a {@code String} representation of this spatial inertia matrix as follows:<br> * * <pre> * Spatial inertia of bodyFrame expressed in World: * / 0.253, 0.000, 0.000, 0.000, 0.554, -0.247 \ * | 0.000, 0.994, 0.000, -0.554, 0.000, 0.387 | * | 0.000, 0.000, 0.084, 0.247, -0.387, 0.000 | * | 0.000, -0.554, 0.247, 0.773, 0.000, 0.000 | * | 0.554, 0.000, -0.387, 0.000, 0.773, 0.000 | * \-0.247, 0.387, 0.000, 0.000, 0.000, 0.773 / * </pre> * * * @return the {@code String} representing this spatial inertia matrix. */ @Override public String toString() { return MecanoIOTools.getSpatialInertiaString(this); } }
private static void throwNotEqualAssertionError(String messagePrefix, SpatialInertiaReadOnly expected, SpatialInertiaReadOnly actual, String format) { String expectedAsString = getSpatialInertiaString(format, expected); String actualAsString = getSpatialInertiaString(format, actual); throwNotEqualAssertionError(messagePrefix, expectedAsString, actualAsString); }