Decimal.this

  1. this(const(C)[] str, int exponentShift)
    struct Decimal(size_t maxSize64)
    @safe pure @nogc
    this
    (
    C
    )
    (
    scope const(C)[] str
    ,
    int exponentShift = 0
    )
    if (
    isSomeChar!C
    )
    if (
    maxSize64 &&
    maxSize64 <= ushort.max
    )
  2. this(T x)

Examples

import mir.math.constant: PI;
Decimal!2 decimal = "3.141592653589793378e-40"; // constructor
assert(cast(double) decimal == double(PI) / 1e40);

Meta