hey phi.lho, thanks for your answer :)
it works well when its an array like:
float sumHourAngle()
{
float angleHourSum = 0;
for(int i = 0; i < 24; i++)
{
angleHourSum += hourAngle[i];
}
return angleHourSum;
}
however it doesn't go well when I try the same for an array list
Array List hourAngle = new Array List();
hourAngle.add(floats);
float sumHourAngle()
{
float test[] = hourAngle.toArray();
float angleHourSum = 0;
for(int i = 0; i < hourAngle.size(); i++)
{
angleHourSum += ((float) test[i]).floatValue();
//angleHourSum += hourAngle.get(i);
}
return angleHourSum;
}
Before I could have the floats in an array, but now the number of floats changes constantly to I am adding them to an array list first and then trying to tranform them back to an array so I can sum them. But I was wandering if that is possible and how is the correct syntax to add the values straight from the array list.
Thanks,
buzz