diff options
author | Erich Eckner <git@eckner.net> | 2019-09-24 09:58:06 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-24 09:58:06 +0200 |
commit | 3c08c7f38cfb50b7dd0b53dd3ff84487cfbc4893 (patch) | |
tree | 93155e7ccd52c18054beb0ab44a7de0b92492d8a /humidity.c | |
parent | 5a5bb02d01fce26195cff8e78e2d106b770c6507 (diff) | |
download | anzeige-3c08c7f38cfb50b7dd0b53dd3ff84487cfbc4893.tar.xz |
humidity: repariert
Diffstat (limited to 'humidity.c')
-rw-r--r-- | humidity.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -4,7 +4,11 @@ double maximale_luftfeuchte(double t) { for (int i=1; i<DAMPF_ANZ; i++) if (dampf_temperaturen[i]>=t) - return (t-dampf_temperaturen[i-1])*(dampf_feuchten[i]-dampf_feuchten[i-1])/(dampf_temperaturen[i]-dampf_temperaturen[i-1]); + return + (t - dampf_temperaturen[i-1]) + * (dampf_feuchten[i] - dampf_feuchten[i-1]) + / (dampf_temperaturen[i] - dampf_temperaturen[i-1]) + + dampf_feuchten[i-1]; return -1; } @@ -12,6 +16,10 @@ double taupunkt(double af) { for (int i=1; i<DAMPF_ANZ; i++) if (dampf_feuchten[i]>=af) - return (af-dampf_feuchten[i-1])*(dampf_temperaturen[i]-dampf_temperaturen[i-1])/(dampf_feuchten[i]-dampf_feuchten[i-1]); + return + (af - dampf_feuchten[i-1]) + * (dampf_temperaturen[i] - dampf_temperaturen[i-1]) + / (dampf_feuchten[i] - dampf_feuchten[i-1]) + + dampf_temperaturen[i-1]; return -1; } |