/***************************************************************************
                          math.cpp  -  description
                             -------------------
    begin                : dim jui 20 2003
    copyright            : (C) 2003 by Troumad
    email                : troumad@libertysurf.fr
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
float puis2(float n) //
{
 int s=1;
 int i;

 for (i=0;i<n;i++)
  s*=2;

 return s;
}

float max(float i, float j)
{
 if (i>j)
  return i;
 else
  return j;
}

float min(float i, float j)
{
 if (i>j)
  return j;
 else
  return i;
}

float car(float i) //
{ return i*i; }

int puis2(int n)
{
 int s=1;
 int i;

 for (i=0;i<n;i++)
  s*=2;

 return s;
}

int max(int i, int j)
{
 if (i>j)
  return i;
 else
  return j;
}

int min(int i, int j)
{
 if (i>j)
  return j;
 else
  return i;
}

int car(int i)
{ return i*i; }
