1 /*
2  *  Mathlib : A C Library of Special Functions
3  *  Copyright (C) 1998 Ross Ihaka
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, a copy is available at
17  *  http://www.r-project.org/Licenses/
18  *
19  *  SYNOPSIS
20  *
21  *    #include <Rmath.h>
22  *    int imin2(int x, int y);
23  *
24  *  DESCRIPTION
25  *
26  *    Compute minimum of two integers.
27  */
28 
29 #include "nmath.h"
30 
imin2(int x,int y)31 int imin2(int x, int y)
32 {
33     return (x < y) ? x : y;
34 }
35