-
Notifications
You must be signed in to change notification settings - Fork 1
concept dimensionless_quantity
kwikius edited this page Aug 8, 2020
·
27 revisions
A type with a numeric value, existing in a dimensionless universe.
The c++ inbuilt arithmetic types are models of dimensionless_quantity1.
| type | model of | notes |
|---|---|---|
| N | dimensionless_quantity |
| value | type | notes |
|---|---|---|
| n1, n2 | N | |
| nres | N | local result |
| b | bool | local result |
| concept | notes |
|---|---|
| scalar< N > |
| typefunction | result | notes |
|---|---|---|
| get_dimension< N > | dimensionless |
| inline_bool_constant | value | notes |
|---|---|---|
| impl::is_dimensionless_quantity_impl< N > | true | states that N meets the requirements below |
| typestruct | result | notes |
|---|---|---|
| impl::get_dimension_impl< N > | dimensionless |
| function | result | notes |
|---|---|---|
| n1 × n2 | nres | |
| n1 / n2 | nres | |
| n1 + n2 | nres | |
| n1 - n2 | nres | |
| n1 < n2 | b | |
| n1 <= n2 | b | |
| n1 != n2 | b | |
| n1 == n2 | b | |
| n1 >= n2 | b | |
| n1 > n2 | b |