Home
last modified time | relevance | path

Searched refs:RAND_MAX (Results 1 – 10 of 10) sorted by relevance

/haiku/src/add-ons/screen_savers/flurry/
H A DShared.h57 #define RandFlt(min, max) (min + (max - min) * rand() / (float) RAND_MAX)
58 #define RandBell(scale) (scale * (1.0f - (rand() + rand() + rand()) / ((float) RAND_MAX * 1.5f)))
/haiku/src/tests/add-ons/kernel/file_systems/bfs/btree/
H A Dtest.cpp187 int32 c = int32(52.0 * rand() / RAND_MAX); in generateName()
469 int32 index = int32(1.0 * gNum * rand() / RAND_MAX); in duplicateTest()
481 int32 insertCount = int32(1000.0 * rand() / RAND_MAX); in duplicateTest()
504 count = int32(1000.0 * rand() / RAND_MAX); in duplicateTest()
544 int32 index = int32(1.0 * gNum * rand() / RAND_MAX); in addRandomSet()
582 int32 index = int32(1.0 * gNum * rand() / RAND_MAX); in removeRandomSet()
762 int32(1.0 * gNum * rand() / RAND_MAX)); in main()
764 int32(1.0 * gNum * rand() / RAND_MAX)); in main()
/haiku/src/tests/add-ons/kernel/file_systems/bfs/array/
H A DsmallArray.cpp28 int32 index = int32(1.0 * rand() * array->count / RAND_MAX); in main()
/haiku/src/add-ons/screen_savers/gravity/
H A DGravitySource.cpp21 #define frand() ((float)rand() / (float)RAND_MAX)
H A DParticle.cpp18 #define frand() ((float)rand() / (float)RAND_MAX)
/haiku/src/tests/system/boot/heap/
H A DheapTest.cpp131 size_t size = size_t(rand() * 1. * maxSize / RAND_MAX); in random_allocations()
252 i = int32(rand() * 100. / RAND_MAX); in main()
/haiku/src/add-ons/screen_savers/nebula/
H A DNebula.cpp739 r = rand() * 1.0 / RAND_MAX; in StartSaver()
743 th = rand() * M_PI * 2 / RAND_MAX; in StartSaver()
746 dth = rand() * 1.0 / RAND_MAX; in StartSaver()
753 dth = rand() * 1.0 / RAND_MAX; in StartSaver()
/haiku/headers/posix/
H A Dstdlib.h17 #define RAND_MAX 0x7fffffff macro
/haiku/src/tests/system/network/tcp_shell/
H A Dtcp_shell.cpp965 || (sRandomDrop > 0.0 && (1.0 * rand() / RAND_MAX) > sRandomDrop)) in domain_receive_data()
971 add = (bigtime_t)(1.0 * rand() / RAND_MAX * 500000) - 250000; in domain_receive_data()
973 sRoundTripTime += (bigtime_t)(1.0 * rand() / RAND_MAX * 150000); in domain_receive_data()
1276 && (1.0 * rand() / RAND_MAX) > sRandomReorder) { in receiving_thread()
/haiku/src/system/libroot/posix/glibc/stdlib/
H A Dstdlib.h127 #define RAND_MAX 2147483647 macro