#include <math.h>

#include "Geom.hpp"
#include "Map.hpp"

Map *DEM;
int point_limit = -1;
real error_threshold = 0.0;

real rint (real in)
{
	return floor(in+0.5);
}

void Map::findLimits()
{
    min = HUGE;
    max = -HUGE;

    for(int i=0;i<width;i++)
	for(int j=0;j<height;j++)
	{
	    real val = eval(i,j);

	    if( val<min ) min = val;
	    if( val>max ) max = val;

	}
}

