Edit

IABSD.fr/ports/games/circuit/patches

Branch :

  • Show log

    Commit

  • Author : espie
    Date : 2002-12-17 21:25:06
    Hash : 3cfd7b5b
    Message : the skew is not obvious, but it's better to write random generators this way... slightly more enjoyable, I think.

  • patch-circuit_c
  • $OpenBSD: patch-circuit_c,v 1.3 2002/12/17 21:25:06 espie Exp $
    --- circuit.c.orig	Tue Dec 17 21:20:16 2002
    +++ circuit.c	Tue Dec 17 21:20:44 2002
    @@ -61,7 +61,7 @@ static GTimer *timer = NULL;
     static unsigned
     random_number(unsigned max)
     {
    -    return(rand() % max);
    +    return(rand()/(double)RAND_MAX * max);
     }
     
     static unsigned