Talk:More Java keyword flashcards

Latest comment: 12 years ago by Dave Braunschweig in topic Random Number Generator

Random Number Generator

edit

I replaced the {{#expr:({{#time:s}}/60*53 round 0)}} random number generator with {{#expr:({{#time:U}} mod 53) + 1}}. The original expression would generate 0 between 0 and 0.49 seconds each minute. There is no switch entry 0, causing the switch to fail. While this can be corrected by adding 0.5 to the original expression, using mod is a cleaner syntax and faster calculation. Dave Braunschweig (talk) 15:59, 27 November 2012 (UTC)Reply

Return to "More Java keyword flashcards" page.