/* File: misc.cp Author: R. P. Futrelle Date: 8/4/98 Notice: Copyright 1998 by R. P. Futrelle and the College of Computer Science, Northeastern University Class: COM1204, Object-Oriented Design, Summer 1998. Proj: PS2.µ Metrowerks Code Warrior Mac. Done in IDE version 2.0.1. Purpose: Miscellaneous function and method definitions. Modification history: 8/1/98: RPF. Started. 8/4/98: RPF. rand_range added. */ #include "includes.h" int rand_range(int minval, int maxval){ return(minval + round((maxval - minval) * rand() / float(RAND_MAX))); }