X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fctsupport.h;fp=include%2Fctsupport.h;h=dbf7dec7529c0b7a07e1db8a010428d46d5876d8;hp=d52c0830be799ba27329a63b9c2d890b6886a392;hb=f692b2d39f56ffbafc04283f32233c098aa2978b;hpb=83ee377ee0b61092ec1522ac1e1361640f74fa06 diff --git a/include/ctsupport.h b/include/ctsupport.h index d52c083..dbf7dec 100644 --- 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 ** -** $Id: ctsupport.h,v 1.23 2001/01/28 19:10:18 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; }