Intro_function
mylib.cpp
Go to the documentation of this file.
1 #include "mylib.h"
2 #include <cassert> // assert
3 
4 // Function with o n e return value
5 float c2k(float const grad_C) // definition of function
6 {
7  float grad_K;
8  grad_K = grad_C + 273.15f; // D o n ' t d o ! 273,15
9  return grad_K;
10 }
11 
12 
13 // Function with m u l t i p le return values
14 void c2kf(float const grad_C, float& grad_K, float &grad_F) // definition of function
15 {
16  assert( grad_C >= -273.15f ); // Stop in case of non-physical values
17  grad_K = c2k(grad_C);
18  grad_F = 9/5.0f*grad_C + 32; // D o n ' t d o ! 9/5
19  return;
20 }
float c2k(float const grad_C)
Definition: mylib.cpp:5
void c2kf(float const grad_C, float &grad_K, float &grad_F)
Definition: mylib.cpp:14