temperature
Temperature units in imperial and SI units
Controller: will
Interface
C++
Temperature
doubletemperature( | double | number | |
units | from_unit | ||
units | to_unit | ) |
Example 1
#include <iostream> #include <codecogs/units/convert/temperature.h> using namespace Units::Convert; int main() { std::cout << "temperature(37,unit_C, unit_K)=" << temperature(37,unit_C, unit_K); return 0; }
Output:temperature(37,unit_C, unit_K)= 98.6
Parameters
number the value in from_unit 's to convert from_unit an enumerated value of the initial temperature type to_unit an emuerated value of the output temperature type
Returns
- the value in the converted unit.
Source Code
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
Other Documentation
The standard measurement units are:Unit names | Alternate names / spellings | Abbreviation | Enumeration Code | Conversion Rate (relative to first unit) |
Temperature | ||||
Celsius | deg C | C | unit_C | 1 |
Fahrenheit | deg F | F | unit_F | 1.8 |
Kelvin | deg K | K | unit_K | 1 |
Source Code
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.