diff options
author | Constantin Riß <constantin.riss@dre.de> | 2010-02-05 14:53:43 +0100 |
---|---|---|
committer | Constantin Riß <constantin.riss@dre.de> | 2010-02-05 14:53:43 +0100 |
commit | b71c8bfd17097c3e0c7711a41893b631cc104203 (patch) | |
tree | 1966f5d48a05eca4c61d786a0712ba28925384dc /Temparray.h | |
parent | f53795458ddf252d08979820a98697cca9327834 (diff) | |
download | c3d-b71c8bfd17097c3e0c7711a41893b631cc104203.tar c3d-b71c8bfd17097c3e0c7711a41893b631cc104203.zip |
blabla
Diffstat (limited to 'Temparray.h')
-rw-r--r-- | Temparray.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Temparray.h b/Temparray.h index ac96c04..0886c9d 100644 --- a/Temparray.h +++ b/Temparray.h @@ -57,6 +57,24 @@ class Temparray } earthtemp=8; } + void calcAverage(){ + float tempcache = 0; + int times = 0; + for(int i=0; i<sx; i++){ + for(int j=0; j<sy; j++){ + for(int k=0; k<sz; k++){ + for(int l=0; l<6; l++){ + for(int m=0; m<4; m++){ + tempcache += temperaturenew(i, j, k, l, m); + ++times; + } + } + } + } + } + averagetemp = tempcache/times; + std::cerr << averagetemp << std::endl; + } }; #endif /* _TEMPARRAY_H_ */ |