// Copyright 1994 by Jon Dart.  All Rights Reserved.

#ifndef _UTIL_H
#define _UTIL_H

class Util
{ 
    // commonly used utility functions
	    
    public:	
	
    static int Abs( const int x )
    {
	 return (x < 0) ? -x : x;    
    }
    
    static int Sign( const int x )
    {
	 if (x==0)
	     return 0;
	 else
	     return (x > 0) ? 1 : -1;
    }
    
    static int Max( const int x, const int y )
    {
	return (x > y) ? x : y;    
    }
  
    static int Min( const int x, const int y )
    {
	return (x > y) ? y : x;    
    }
  
};

#endif
