@@ -9,6 +9,16 @@ const SYNONYM_MAPPING = NamedTuple(DIMENSION_NAMES .=> DIMENSION_SYNONYMS)
9
9
A type representing the dimensions of a quantity, with each
10
10
field giving the power of the corresponding dimension. For
11
11
example, the dimensions of velocity are `Dimensions(length=1, time=-1)`.
12
+
13
+ # Fields
14
+
15
+ - `length::Rational{Int}`: length dimension (i.e., meters^(length))
16
+ - `mass::Rational{Int}`: mass dimension (i.e., kg^(mass))
17
+ - `time::Rational{Int}`: time dimension (i.e., s^(time))
18
+ - `current::Rational{Int}`: current dimension (i.e., A^(current))
19
+ - `temperature::Rational{Int}`: temperature dimension (i.e., K^(temperature))
20
+ - `luminosity::Rational{Int}`: luminosity dimension (i.e., cd^(luminosity))
21
+ - `amount::Rational{Int}`: amount dimension (i.e., mol^(amount))
12
22
"""
13
23
struct Dimensions
14
24
length:: R
@@ -45,6 +55,12 @@ You can access specific dimensions with `ulength(q)`, `umass(q)`, `utime(q)`,
45
55
46
56
Severals operators in `Base` are extended to work with `Quantity` objects,
47
57
including `*`, `+`, `-`, `/`, `^`, `sqrt`, and `cbrt`.
58
+
59
+ # Fields
60
+
61
+ - `value::T`: value of the quantity of some type `T`
62
+ - `dimensions::Dimensions`: dimensions of the quantity
63
+ - `valid::Bool`: whether the quantity is valid or not
48
64
"""
49
65
struct Quantity{T}
50
66
value:: T
0 commit comments