Beispiel #1
0
// Returns a random floating-point value in the rage [0,1]
inline double RandomFloat(  ) {
  return ranf_next( );
}
Beispiel #2
0
// Returns a random floating-point value in the rage [0,max]
inline double RandomFloat( double max ) {
  return ( ranf_next( ) * max );
}
Beispiel #3
0
float RandomFloat( float max )
  // Returns a random floating-point value in the rage [0,max]
{
  return ( (float)ranf_next( ) * max );
}