Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
GCMath.h
Go to the documentation of this file.
1
#ifndef GCMath_
2
3
//
4
// Who to blame: Geoff Chesshire
5
//
6
7
#include <math.h>
8
#include "
OvertureTypes.h
"
9
10
inline
Integer
min0
(
const
Integer
& i,
const
Integer
& j)
11
{
return
i < j ? i : j; }
12
inline
Integer
max0
(
const
Integer
& i,
const
Integer
& j)
13
{
return
i > j ? i : j; }
14
inline
Real
amin1
(
const
Real
& x,
const
Real
& y) {
return
x < y ? x : y; }
15
inline
Real
amax1
(
const
Real
& x,
const
Real
& y) {
return
x > y ? x : y; }
16
inline
Integer
Iabs
(
const
Integer
& i ) {
return
i < 0 ? -i : i; }
17
inline
Real
Fabs
(
const
Real
& x ) {
return
x < 0 ? -x : x; }
18
inline
Real
Sqr
(
const
Real
& x) {
return
x * x; }
19
inline
Real
Sqrt
(
const
Real
& x) {
return
(
Real
)sqrt(x); }
20
inline
Integer
Isign
(
const
Integer
& i,
const
Integer
& j)
21
{
return
j < 0 ? -
Iabs
(i) :
Iabs
(i); }
22
inline
Real
Fsign
(
const
Real
& x,
const
Real
& y)
23
{
return
y < 0 ? -
Fabs
(x) :
Fabs
(x); }
24
25
#define GCMath_
26
#endif // GCMath_
Generated on Fri Jan 4 2013 10:17:52 for Overture by
1.8.3