Quantity

A quantity that can be expressed as the product of a number and a set of dimensions.

Constructors

this
this(Q other)
Undocumented in source.
this
this(T value)
Undocumented in source.

Alias This

rawValue

Members

Aliases

dimensions
alias dimensions = Dim

The dimension tuple of the quantity.

valueType
alias valueType = N

The type of the underlying numeric value.

Functions

isConsistentWith
bool isConsistentWith(Q other)

Tests wheter this quantity has the same dimensions as another one.

opAssign
void opAssign(Q other)

Overloaded operators. Only dimensionally correct operations will compile.

opAssign
void opAssign(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
auto opBinary(T power)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
Q opCast()

Cast a quantity to another quantity type with the same dimensions

opCast
T opCast()

Cast a dimensionless quantity to a numeric type

opCmp
int opCmp(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
int opCmp(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Q other)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(T other)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
auto opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
auto opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
void toString(void delegate(const(char)[]) sink, FormatSpec!char fmt)
Undocumented in source. Be warned that the author may not have intended to support it.
value
N value(Q target)

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

Properties

baseUnit
Quantity baseUnit [@property getter]

Gets the base unit of this quantity.

rawValue
N rawValue [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

make
Quantity make(T value)
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

checkDim
template checkDim(string dim)
Undocumented in source.
checkValueType
template checkValueType(string type)
Undocumented in source.

Meta