From: Lane S. <la...@op...> - 2003-03-28 15:09:16
|
Why did you not add a test case? -Lane Keats Kirsch wrote: > I've committed this change along with a little test in main(). > > Keats > > Eric B. Ridge wrote: > >> On Thursday, March 27, 2003, at 11:29 AM, kea...@na... >> wrote: >> >> > > I may fail to understand the code, but it seems wrong to me >> > > so I changed it to >> > > >> > > public static final int random(int start, int end) { >> > > int iRet = start + (int) ((end - start + >> > > 1)*java.lang.Math.random()); >> > > return iRet > end ? end : iRet; >> > > } >> > >> > Your code looks right to me, but the final test is unnecessary, since >> > Math.random() is always less than 1.0. >> > >> > Eric, I think this was your thing. Do you want to do the fix, or >> > shall I? >> >> If you're in the mood, go ahead. :) I'm snowed under here at the >> office. >> >> eric >> > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > -- Lane Sharman Learn About Conga, All Java GUI Builder: http://opendoors.com/conga Java Software Portal: http://opendoors.com |