Changeset 68 for trunk/src/core/RpUnitsStd.cc
- Timestamp:
- Sep 26, 2005, 6:55:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/RpUnitsStd.cc
r20 r68 131 131 /**************************************** 132 132 * METRIC TO NON-METRIC CONVERSIONS 133 * LENGTH CONVERSIONS 134 * http://www.nodc.noaa.gov/dsdt/ucg/ 133 135 ****************************************/ 134 136 … … 143 145 } 144 146 147 double meter2inch (double m) 148 { 149 return (m*39.37008); 150 } 151 152 double inch2meter (double in) 153 { 154 return (in/39.37008); 155 } 156 157 double meter2feet (double m) 158 { 159 return (m*3.280840); 160 } 161 162 double feet2meter (double ft) 163 { 164 return (ft/3.280840); 165 } 166 167 double meter2yard (double m) 168 { 169 return (m*1.093613); 170 } 171 172 double yard2meter (double yd) 173 { 174 return (yd/1.093613); 175 } 176 145 177 /**************************************** 146 178 * TEMPERATURE CONVERSIONS … … 167 199 } 168 200 201 double rankine2kelvin (double R) 202 { 203 return ((9.0/5.0)*R); 204 } 205 206 double kelvin2rankine (double K) 207 { 208 return ((5.0/9.0)*K); 209 } 210 211 double fahrenheit2kelvin (double F) 212 { 213 return ((F+459.67)*(5.0/9.0)); 214 } 215 216 double kelvin2fahrenheit (double K) 217 { 218 return (((9.0/5.0)*K)-459.67); 219 } 220 221 /**************************************** 222 * ENERGY CONVERSIONS 223 ****************************************/ 224 225 double electronVolt2joule (double eV) 226 { 227 return (eV*1.602177e-19); 228 } 229 230 double joule2electronVolt (double J) 231 { 232 return (J*1.602177e19); 233 } 169 234 170 235 #ifdef __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.