#include "mylib.h"
#include <cassert>
Go to the source code of this file.
|
float | c2k (float const grad_C) |
|
void | c2kf (float const grad_C, float &grad_K, float &grad_F) |
|
◆ c2k()
float c2k |
( |
float const |
grad_C | ) |
|
Calculates Kelvin from degree Celsius.
- Parameters
-
[in] | grad_C | Temperature in degree Celsius |
- Returns
- Temperature in Kelvin
- Warning
- No check for non-physical values (<0 Kelvin)
Definition at line 5 of file mylib.cpp.
8 grad_K = grad_C + 273.15f;
◆ c2kf()
void c2kf |
( |
float const |
grad_C, |
|
|
float & |
grad_K, |
|
|
float & |
grad_F |
|
) |
| |
Calculates Kelvin and degree Fahrenheit from degree Celsius.
- Parameters
-
[in] | grad_C | Temperature in degree Celsius |
[out] | grad_K | Temperature in Kelvin |
[out] | grad_F | Temperature in degree Fahrenheit |
- Warning
- Code stops for non-physical values (<0 Kelvin). Compiler option -NDEBUG switches off this check.
Definition at line 14 of file mylib.cpp.
16 assert( grad_C >= -273.15f );
18 grad_F = 9/5.0f*grad_C + 32;
float c2k(float const grad_C)