source: trunk/include/core/RpUnitsStd.h @ 68

Last change on this file since 68 was 68, checked in by dkearney, 17 years ago

fixed the python rpunits setup script so now it really finds PyRpUnits?.cc

added more conversions to RpUnitsStd?.[h,cc]

added static convert function to RpUnits.[h,cc] so now users can ask for a
conversion as without having to make an RpUnits Object. instead, the
user specifies the value to be converted (value with attached units) as well
as the units we should convert to and if they want units in the returned
string. if the units exist, the conversion is done, if not, the original
string should be returned.

also added the ability to load preset units into the dictionary.
use the static function RpUnits::addPresets(...) in c++ this is done
automatically in python (although, maybe it shouldn't be).

File size: 1.5 KB
Line 
1
2#ifdef __cplusplus
3extern "C" {
4#endif
5
6double centi2base   (double centi);
7double milli2base   (double milli);
8double micro2base   (double micro);
9double nano2base    (double nano);
10double pico2base    (double pico);
11double femto2base   (double femto);
12double atto2base    (double atto);
13double kilo2base    (double kilo);
14double mega2base    (double mega);
15double giga2base    (double giga);
16double tera2base    (double tera);
17double peta2base    (double peta);
18
19
20double base2centi   (double base);
21double base2milli   (double base);
22double base2micro   (double base);
23double base2nano    (double base);
24double base2pico    (double base);
25double base2femto   (double base);
26double base2atto    (double base);
27double base2kilo    (double base);
28double base2mega    (double base);
29double base2giga    (double base);
30double base2tera    (double base);
31double base2peta    (double base);
32
33
34
35double angstrom2meter (double angstrom);
36double meter2angstrom (double meters);
37double meter2inch (double m);
38double inch2meter (double in);
39double meter2feet (double m);
40double feet2meter (double ft);
41double meter2yard (double m);
42double yard2meter (double yd);
43
44
45
46
47double fahrenheit2centigrade (double F);
48double centigrade2fahrenheit (double C);
49double centigrade2kelvin (double C);
50double kelvin2centigrade (double K);
51double rankine2kelvin (double R);
52double kelvin2rankine (double K);
53double fahrenheit2kelvin (double F);
54double kelvin2fahrenheit (double K);
55
56
57
58double electronVolt2joule (double eV);
59double joule2electronVolt (double J);
60
61
62
63
64
65
66
67
68
69
70
71#ifdef __cplusplus
72}
73#endif
Note: See TracBrowser for help on using the repository browser.