www.pudn.com > MyGame.rar > Utility.h


/***************************************************************************** 
 * VCGLib                                                                    * 
 *					                                                         * 
 * Visual Computing Group                                                o>  * 
 * IEI Institute, CNUCE Institute, CNR Pisa                             <|   * 
 *                                                                      / \  * 
 * Copyright(C) 1999 by Paolo Cignoni, Claudio Rocchini                      * 
 * All rights reserved.                                                      * 
 *					                                                         * 
 * Permission  to use, copy, modify, distribute  and sell this  software and * 
 * its documentation for any purpose is hereby granted without fee, provided * 
 * that  the above copyright notice appear  in all copies and that both that * 
 * copyright   notice  and  this  permission  notice  appear  in  supporting * 
 * documentation. the author makes  no representations about the suitability * 
 * of this software for any purpose. It is provided  "as is" without express * 
 * or implied warranty.                                                      * 
 *					                                                         * 
 *****************************************************************************/ 
/**************************************************************************** 
  History 
 
 1999 Feb 02 First Draft. 
 1999 May 15 Corrected Scope of sqrt.. (added ::) 
 
****************************************************************************/ 
#ifndef __VCGLIB_UTILITY 
#define __VCGLIB_UTILITY 
 
#include  
namespace vcg { 
  inline int		sqrt(int v)	   {return int(::sqrt(v));}; 
  inline short  sqrt(short v)  {return short(::sqrtf(v));}; 
  inline float  sqrt(float v)  {return ::sqrtf(v);}; 
  inline double sqrt(double v) {return ::sqrt(v);}; 
  inline int		abs(int v)	   {return ::abs(v);}; 
  inline short  abs(short v)   {return short(::abs(v));}; 
  inline float  abs(float v)   {return ::fabsf(v);}; 
  inline double abs(double v)  {return ::fabs(v);}; 
} 
#endif