matchExponent

Match two exponent.

@safe @nogc nothrow pure
matchExponent
()
(
auto scope ref const(Decimal) a
,
auto scope ref const(Decimal) b
)

Parameters

a const(Decimal)

price number 1.

b const(Decimal)

price number 2.

Return Value

Type: auto

matched exponent.

Examples

immutable a = Decimal(123456, 3);
assert(matchExponent(a, a) == tuple(a, a));

immutable b = Decimal(7890120, 4);
assert(matchExponent(a, b) == tuple(Decimal(1234560, 4), b));
assert(matchExponent(b, a) == tuple(b, Decimal(1234560, 4)));

Meta