summaryrefslogtreecommitdiffstats
path: root/Temparray.h
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-02-05 14:53:43 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-02-05 14:53:43 +0100
commitb71c8bfd17097c3e0c7711a41893b631cc104203 (patch)
tree1966f5d48a05eca4c61d786a0712ba28925384dc /Temparray.h
parentf53795458ddf252d08979820a98697cca9327834 (diff)
downloadc3d-b71c8bfd17097c3e0c7711a41893b631cc104203.tar
c3d-b71c8bfd17097c3e0c7711a41893b631cc104203.zip
blabla
Diffstat (limited to 'Temparray.h')
-rw-r--r--Temparray.h18
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_ */