Searched refs:rand (Results 26 - 50 of 74) sorted by relevance

123

/haiku/src/tests/add-ons/kernel/file_systems/bfs/btree/
H A Dtest.cpp185 int32 length = rand() % (MAX_STRING - MIN_STRING) + MIN_STRING;
187 int32 c = int32(52.0 * rand() / RAND_MAX);
469 int32 index = int32(1.0 * gNum * rand() / RAND_MAX);
481 int32 insertCount = int32(1000.0 * rand() / RAND_MAX);
504 count = int32(1000.0 * rand() / RAND_MAX);
544 int32 index = int32(1.0 * gNum * rand() / RAND_MAX);
582 int32 index = int32(1.0 * gNum * rand() / RAND_MAX);
762 int32(1.0 * gNum * rand() / RAND_MAX));
764 int32(1.0 * gNum * rand() / RAND_MAX));
/haiku/src/add-ons/tracker/iconvader/
H A DIconVader.cpp102 location.x += ((rand() % 20) - 10);
103 location.y += ((rand() % 20) - 10);
/haiku/src/tests/add-ons/kernel/file_systems/random_read/
H A Drandom_read.cpp88 off_t pos = rand() % size;
90 int32 bytes = (rand() % BUFFER_SIZE) + 4;
/haiku/src/tests/servers/app/benchmark/
H A DStringTest.cpp78 buffer[j] = 'A' + rand() % ('z' - 'A');
/haiku/src/add-ons/screen_savers/icons/
H A DIconDisplay.cpp24 #define RAND_BETWEEN(a, b) ((rand() % ((b) - (a) + 1) + (a)))
H A DIconsSaver.cpp30 #define RAND_BETWEEN(a, b) ((rand() % ((b) - (a) + 1) + (a)))
/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/servers/app/stacktile/
H A Dmain.cpp94 int a = rand();
/haiku/src/apps/mediaplayer/playlist/
H A DRandomizePLItemsCommand.cpp61 int32 randomSetIndex = rand() % indexSet.CountItems();
/haiku/src/tests/servers/app/newerClipping/
H A DClientLooper.cpp26 return v1 + fmod(rand() / 1000.0, (v2 - v1));
28 return v2 + fmod(rand() / 1000.0, (v1 - v2));
/haiku/src/tests/system/boot/heap/
H A DheapTest.cpp131 size_t size = size_t(rand() * 1. * maxSize / RAND_MAX);
252 i = int32(rand() * 100. / RAND_MAX);
/haiku/src/add-ons/screen_savers/leaves/
H A DLeaves.cpp230 if ((rand() & 64) == 0) transform.ScaleBy(-1., 1.);
238 int color = (rand() / 7) % kColorCount;
/haiku/src/tests/system/kernel/util/
H A DVectorTest.cpp563 return rand() % fDifferentValues;
584 sprintf(buffer, "%ld", rand() % fDifferentValues);
659 int32 index = rand() % (i + 1);
673 int32 index = rand() % (i + 1);
708 int32 index = rand() % (i + 1);
725 int32 index = rand() % (v.Count());
764 int32 index = rand() % (i + 1);
779 int32 index = rand() % (i + 1);
H A DVectorSetTest.cpp455 return rand() % fDifferentValues;
476 sprintf(buffer, "%ld", rand() % fDifferentValues);
577 int32 index = rand() % (v.Count());
618 int32 index = rand() % (i + 1);
/haiku/src/apps/pairs/
H A DPairsView.cpp18 // for srand() and rand()
174 int32 index = rand() % i;
214 std::advance(iter, rand() % mapSize);
/haiku/src/add-ons/screen_savers/nebula/
H A DNebula.cpp729 gal[i].x = 1 * ((rand()&1023) - 512);
730 gal[i].y = 1 * ((rand()&1023) - 512);
731 gal[i].z = 1 * ((rand()&1023) - 512);
732 gal[i].r = rand() & 63;
739 r = rand() * 1.0 / RAND_MAX;
743 th = rand() * M_PI * 2 / RAND_MAX;
745 th = (rand() & 3) * M_PI_2 + r * r * 2;
746 dth = rand() * 1.0 / RAND_MAX;
753 dth = rand() * 1.0 / RAND_MAX;
/haiku/src/libs/uuid/
H A Dgen_uuid.c59 #define rand() random() macro
99 rand();
133 *cp++ ^= (rand() >> 7) & 0xFF;
/haiku/src/add-ons/kernel/debugger/hangman/
H A Dhangman.c144 off_t offset = (rand() % (sz - MAX_LETTERS));
185 if (get_thread_info(rand() % 200, &ti) != B_OK)
190 offset = (rand() % (sz - MIN_LETTERS));
/haiku/src/tests/system/network/tcptester/
H A Dtcptester.cpp64 return lower + rand() % (upper - lower + 1);
/haiku/src/tests/add-ons/kernel/file_systems/random_file_actions/
H A Drandom_file_actions.cpp255 return (file_action)(rand() % kNumActions);
262 return rand() % entries.size();
311 off_t size = min_c(rand() % sMaxFileSize, sMaxFileSize);
/haiku/src/tests/kits/media/nodetest/
H A DConsumerNode.cpp226 snooze((rand() * 100) % 200000);
/haiku/headers/posix/
H A Dstdlib.h105 extern int rand(void);
/haiku/src/tests/servers/app/bitmap_drawing/
H A Dmain.cpp31 return v1 + fmod(rand() / 1000.0, (v2 - v1));
33 return v2 + fmod(rand() / 1000.0, (v1 - v2));
/haiku/src/add-ons/kernel/file_systems/bfs/
H A DVolume.cpp381 id = ((uint64_t)rand() << 32) | rand();

Completed in 247 milliseconds

123