Originally Posted by
whiteflags
Well laserlight's idea still works, but instead of writing a class you would declare another variable for the maximal value and then call std::max() over and over in the loop. When the loop is done, just look at that maximal value.
Thanks!!
So basically, just keep a variable for the max.
I suppose its quicker to just do:
Code:
xMax = (X > xMax)?X:xMax;
yMax = (Y > yMax)?Y:yMax;
Whereby, if X is greater than xMax then the value for X becomes the new value for xMax otherwise xMax keeps its current value. And similarly with Y?
What do you think? OK?