-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunit.html
More file actions
93 lines (76 loc) · 3.28 KB
/
Copy pathunit.html
File metadata and controls
93 lines (76 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
layout: default
---
<div class="content">
<h1>Unit <span class="extends">extends <a href="collection">Collection</a></h1>
<div class="desc">
<p>A <u>Unit</u> represents a single unit. A <a href="unitFactor">UnitFactor</a> may be applied.</p>
<p><u>Unit</u> instances are <i>immutable</i> and globally shared.</p>
{% include unit-table.html %}
</div>
<h2>static</h2>
<article>
<b class="method"></b>
<b class="server"></b>
<span class="sig">parse(text: string): <a href="unit">Unit</a></span>
<p>This will return the a unit for the given text. For example, "m/s" will return the unit for velocity in meters per second.</p>
</article>
<h2>instance</h2>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">abbreviation: string</span>
<p>Contains the abbreviation of the Unit. For example, "s" for "second", "g" for "gram", ...</p>
</article>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">baseAdditive: number</span>
<p>What to add to this unit in order to reach the normal for the given type. For example, the baseAdditive for "celsius" is 273.15.</p>
</article>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">baseMultiplier: number</span>
<p>What to multiply this unit by to reach the normal for the given type. For eaxmple, the normal for the "length" type is the "meter". Therefore, if
this unit was the "centimeter", the baseMultiplier would be 0.01 since 1 centimeter is 1/100th of a meter.</p>
</article>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">factor: <a href="unitFactor">UnitFactor</a></span>
<p>The UnitFactor for this Unit. For example, the factor for the "kilogram" is "kilo".</p>
</article>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">formula: string</span>
<p>Contains the formula of this Unit if it is a derived type. For example, the "newton" is "m<sup>1</sup>kg<sup>1</sup>/s<sup>2</sup>", or
1 degree of meter, 1 degree of kilogram, and -2 degrees of second.<p>
</article>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">name: string</span>
<p>Contains the name of the Unit. For example, "gram", "second", ...</p>
</article>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">sid: string</span>
<p>This is a unique id like _id, used when integers cannot be used.</p>
<p><u>sid</u> stands for "string ID".</p>
</article>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">system: <a href="unitSystem">UnitSystem</a></span>
<p>The UnitSystem for this Unit, i.e. "metric, "english", "planck", ...</p>
</article>
<article>
<b class="property"></b>
<b class="server"></b>
<span class="sig">type: <a href="unitType">UnitType</a></span>
<p>The UnitType for this Unit. For example, the type for the "newton" is "force".</p>
</article>
</div>