pow

Raises a quantity to a given power.

Because the exponent must be known at compile-time (to determine the unit of the result), overloading the ^^ operator for quantities is not possible.

  1. auto pow(U u)
  2. auto pow(U u)
  3. auto pow(Q q)
    @safe
    pow
    (
    Exp
    Q : Quantity!(U, V)
    U
    V
    )
    (
    Q q
    )
  4. auto pow(Q q)

Examples

auto area = pow!2(5 * metre);

Meta