X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=include%2Fctsupport.h;h=dbf7dec7529c0b7a07e1db8a010428d46d5876d8;hb=5a6caa64e880f613b82e516031028d02fd127257;hp=d843a085b9cb899eb3936e42c1711f7c2d9fb723;hpb=c00c639073653fac7463a88f2b000f263236550d;p=ctsim.git diff --git a/include/ctsupport.h b/include/ctsupport.h index d843a08..dbf7dec 100644 --- a/include/ctsupport.h +++ b/include/ctsupport.h @@ -7,9 +7,9 @@ ** Date Started: Dec. 83 ** ** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg +** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ctsupport.h,v 1.22 2001/01/02 16:02:12 kevin Exp $ +** $Id: ctsupport.h,v 1.24 2001/02/02 00:46:38 kevin Exp $ ** ** ** This program is free software; you can redistribute it and/or modify @@ -191,6 +191,10 @@ template inline T nearest (double x) { return (x > 0 ? static_cast(x+0.5) : static_cast(x-0.5)); } +template +inline T maxValue (T x, T y) +{ return (x > y ? x : y); } + inline bool isEven (int n) { return (n % 2) == 0; }