-
Notifications
You must be signed in to change notification settings - Fork 0
/
stdlib.txt
68 lines (54 loc) · 1.88 KB
/
stdlib.txt
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
# The si- prefix automatically generates prefixes like kilo-
si-unit meter/meters(m)
unit inch/inches(in) = 2.54 cm
unit foot/feet(ft) = 12 in
unit yard/yards(yd) = 3 ft
unit mile/miles(mi) = 5280 ft
si-unit second/seconds(s)
unit minute/minutes(min) = 60 seconds
unit hour/hours(hr) = 60 minutes
unit day/days(d) = 24 hours
unit year/years(yr) = 365 days
unit julianYear = 365.25 days
unit decade/decades = 10 years
unit century/centuries = 100 years
unit millenium/millenia = 1000 years
# The kilogram is technically the SI base unit, not the gram, but it doesn't matter here
# because there's no automatic conversion to base units.
si-unit gram/grams(g)
si-unit ampere/amperes/amp/amps(A)
si-unit mole/moles(mol)
si-unit candela/candelas(cd)
si-unit hertz(Hz) = 1/s
si-unit newton/newtons(N) = kg*m/s^2
si-unit pascal/pascals(Pa) = N/m^2
si-unit joule/joules(J) = N*m
si-unit watt/watts(W) = J/s
si-unit coulomb/coulombs(C) = s*A
si-unit volt/volts(V) = W/A
si-unit farad/farads(F) = C/V
si-unit ohm/ohms = V/A
si-unit siemens(S) = A/V
si-unit weber/webers(Wb) = V*s
si-unit tesla/teslas(T) = Wb/m^2
si-unit henry/henries(H) = Wb/A
lightSpeed = 299792458 m/s
unit lightYear/lightYears = lightSpeed * 1 julianYear
si-unit parsec/parsecs(pc) = 3.08567758149137*10^16 m
unit astronomicalUnit/astronomicalUnits(AU) = 1.4960*10^11 m
unit pound/pounds(lb/lbs) = 0.45359 kg
unit oz = 1 lb / 16
unit mph = mi/hr
unit kph = km/hr
unit acre/acres = 43560 ft^2
si-unit hectare/hectares(ha) = 10000 m^2
si-unit liter/litre/liters/litres(L) = 1 dm^3
si-unit electronvolt/electronvolts(eV) = 1.6*10^(-19) J
earthGravity = 9.8 m/s^2
pi = 3.141592653589793238462643383279
e = 2.718281828459045235360287471352
# This file doesn't include temperature units because conversions between
# they require addition, which isn't supported in unit conversions.
bin-unit bit/bits(b)
bin-unit byte/bytes(B) = 8 bits
unit dollar/dollars