Quantity.toString

Returns the default string representation of the quantity.

By default, a quantity is represented as a string by a number followed by the set of dimensions between brackets.

struct Quantity(N, Dim...)
const
string
toString
()

Examples

enum inch = 2.54 * centi(meter);
assert(inch.toString == "0.0254 [L]", inch.toString);

Meta