Struct Quantity
A quantity checked at compile-time for dimensional consistency.
struct Quantity(N, alias dims)
;
Constructors
Name | Description |
this
|
Creates a new quantity from another one with the same dimensions.
|
this
|
Creates a new dimensionless quantity from a number
|
Properties
Name | Type | Description |
baseUnit [get]
|
Quantity | Returns the base unit of this quantity.
|
Methods
Name | Description |
get
|
Implicitly convert a dimensionless value to the value type.
|
isConsistentWith
|
Tests wheter this quantity has the same dimensions as another one.
|
opAssign
|
Operator overloading
|
opBinary
|
Operator overloading
|
opBinaryRight
|
Operator overloading
|
opCast
|
Cast a dimensionless quantity to a numeric type.
|
opCmp
|
Operator overloading
|
opEquals
|
Operator overloading
|
opOpAssign
|
Operator overloading
|
opUnary
|
Operator overloading
|
value
|
Gets the value of this quantity when expressed in the given target unit.
|
Parameters
Name | Description |
N | the numeric type of the quantity. |
See Also
QVariant has the same public members and overloaded operators as Quantity.