Skip to content

Commit

Permalink
simlib: min, max are already available
Browse files Browse the repository at this point in the history
Find which C standard library does not provide them
And if there is one, see if grass support that compiler/platform combination
To be discussed
  • Loading branch information
rkanavath committed Dec 30, 2019
1 parent 898c134 commit ab2b961
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
29 changes: 0 additions & 29 deletions raster/r.sim/simlib/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,3 @@ double amin1(double arg1, double arg2)

return res;
}

int min(int arg1, int arg2)
{
int res;

if (arg1 <= arg2) {
res = arg1;
}
else {
res = arg2;
}

return res;
}

int max(int arg1, int arg2)
{
int res;

if (arg1 >= arg2) {
res = arg1;
}
else {
res = arg2;
}

return res;
}

2 changes: 0 additions & 2 deletions raster/r.sim/simlib/waterglobs.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ extern double gasdev(void);
extern void gasdev_for_paralel(double *, double *);
extern double amax1(double, double);
extern double amin1(double, double);
extern int min(int, int);
extern int max(int, int);
extern void create_observation_points();

extern double xmin, ymin, xmax, ymax;
Expand Down

0 comments on commit ab2b961

Please sign in to comment.