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