increase clarity of floating point usage
This commit is contained in:
@@ -60,7 +60,7 @@ float resistance_to_temperature(float r) {
|
|||||||
float r_0 = 10000;
|
float r_0 = 10000;
|
||||||
float b = 3975;
|
float b = 3975;
|
||||||
|
|
||||||
return 1 / ( (1/t_0) + (1/b)*log(r/r_0));
|
return 1.0 / ( (1.0/t_0) + (1.0/b)*log(r/r_0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ float resistance_to_temperature(float r) {
|
|||||||
float r_0 = 10000;
|
float r_0 = 10000;
|
||||||
float b = 3975;
|
float b = 3975;
|
||||||
|
|
||||||
return 1 / ( (1/t_0) + (1/b)*log(r/r_0));
|
return 1.0 / ( (1.0/t_0) + (1.0/b)*log(r/r_0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user