Quantity.value

Gets the value of this quantity expressed in the given target unit.

struct Quantity(N, Dim...)
const
N
value
(
Q
)
()

Examples

import quantities.si : minute, hour;
auto time = 120 * minute;
assert(time.value(hour) == 2);
assert(time.value(minute) == 120);

Meta