From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/tests/random.cpp | 62 ++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src/tests/random.cpp') diff --git a/src/tests/random.cpp b/src/tests/random.cpp index 3799803..e48c543 100644 --- a/src/tests/random.cpp +++ b/src/tests/random.cpp @@ -9,41 +9,41 @@ using namespace Bu; template void coverage() { - T rand; - rand.seed( time( NULL ) ); - - uint32_t uBucket[78]; - memset( uBucket, 0, sizeof(uint32_t)*78 ); - - for( int j = 0; j < 1000000; j++ ) - { - uBucket[(int)(((uint32_t)rand.rand())/(double)(0xfffffffful)*78+0.5)]++; - } - - uint32_t uMax = 0; - for( int j = 0; j < 78; j++ ) - { - if( uMax < uBucket[j] ) - uMax = uBucket[j]; - } - - for( int y = 20; y >= 1; y-- ) - { - uint32_t iT = (uint32_t)((y/20.0)*uMax); - for( int x = 0; x < 78; x++ ) - { - sio << ((iT<=uBucket[x])?"#":" "); - } - sio << sio.nl; - } + T rand; + rand.seed( time( NULL ) ); + + uint32_t uBucket[78]; + memset( uBucket, 0, sizeof(uint32_t)*78 ); + + for( int j = 0; j < 1000000; j++ ) + { + uBucket[(int)(((uint32_t)rand.rand())/(double)(0xfffffffful)*78+0.5)]++; + } + + uint32_t uMax = 0; + for( int j = 0; j < 78; j++ ) + { + if( uMax < uBucket[j] ) + uMax = uBucket[j]; + } + + for( int y = 20; y >= 1; y-- ) + { + uint32_t iT = (uint32_t)((y/20.0)*uMax); + for( int x = 0; x < 78; x++ ) + { + sio << ((iT<=uBucket[x])?"#":" "); + } + sio << sio.nl; + } } int main() { - coverage(); - coverage(); - coverage(); + coverage(); + coverage(); + coverage(); - return 0; + return 0; } -- cgit v1.2.3