ipdf-svn/inc/utils.h File Reference

#include "goo/gtypes.h"

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  point
struct  rectangle

Functions

int min (const int a, const int b)
int max (const int a, const int b)
void swap (int &a, int &b)
void swap (double &a, double &b)


Function Documentation

int max ( const int  a,
const int  b 
) [inline]

Definition at line 28 of file utils.h.

00029 {
00030     return (a > b)? a : b;
00031 }

int min ( const int  a,
const int  b 
) [inline]

Definition at line 23 of file utils.h.

00024 {
00025     return (a > b)? b: a;
00026 }

void swap ( double &  a,
double &  b 
) [inline]

Definition at line 39 of file utils.h.

00040 {
00041     double t = a; a = b; b = t;
00042 }

void swap ( int &  a,
int &  b 
) [inline]

Definition at line 34 of file utils.h.

00035 {
00036     int t = a; a = b; b = t;
00037 }


Generated on Wed Feb 4 18:26:07 2009 by  doxygen 1.5.6