projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r1856: *** empty log message ***
[ctsim.git]
/
include
/
ctsupport.h
diff --git
a/include/ctsupport.h
b/include/ctsupport.h
index d52c0830be799ba27329a63b9c2d890b6886a392..dbf7dec7529c0b7a07e1db8a010428d46d5876d8 100644
(file)
--- a/
include/ctsupport.h
+++ b/
include/ctsupport.h
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: ctsupport.h,v 1.2
3 2001/01/28 19:10:1
8 kevin Exp $
+** $Id: ctsupport.h,v 1.2
4 2001/02/02 00:46:3
8 kevin Exp $
**
**
** This program is free software; you can redistribute it and/or modify
**
**
** This program is free software; you can redistribute it and/or modify
@@
-191,6
+191,10
@@
template<class T>
inline T nearest (double x)
{ return (x > 0 ? static_cast<T>(x+0.5) : static_cast<T>(x-0.5)); }
inline T nearest (double x)
{ return (x > 0 ? static_cast<T>(x+0.5) : static_cast<T>(x-0.5)); }
+template<class T>
+inline T maxValue (T x, T y)
+{ return (x > y ? x : y); }
+
inline bool isEven (int n)
{ return (n % 2) == 0; }
inline bool isEven (int n)
{ return (n % 2) == 0; }