Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 56 lines (41 sloc) 828 Bytes
#ifndef com_sleepless_math_math_cpp
#define com_sleepless_math_math_cpp
// Copyright 1998-2002
// Sleepless Software Inc.
// All Rights Reserved
struct Math
{
static int abs(int a)
{
return (a < 0) ? -a : a;
}
static long abs(long a)
{
return (a < 0) ? -a : a;
}
static float abs(float a)
{
return (a < 0) ? -a : a;
}
static double abs(double a)
{
return (a < 0) ? -a : a;
}
static int greater(int a, int b)
{
return (a >= b) ? a : b;
}
static long greater(long a, long b)
{
return (a >= b) ? a : b;
}
static int lesser(int a, int b)
{
return (a <= b) ? a : b;
}
static long lesser(long a, long b)
{
return (a <= b) ? a : b;
}
};
#endif // com_sleepless_math_math_cpp