Searched refs:rand (Results 1 - 25 of 74) sorted by path

123

/haiku/headers/cpp/
H A Dstl_algo.h833 // whether we're using rand (part of the standard C library) or lrand48
839 return rand() % __n;
/haiku/src/add-ons/mail_daemon/outbound_protocols/smtp/
H A DSMTP.cpp549 temp[i] = 1+(rand()%254);
/haiku/src/add-ons/screen_savers/flurry/
H A DShared.h56 #define random() rand()
57 #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/add-ons/screen_savers/glife/
H A DGLifeGrid.cpp46 m_pbGrid[ (iRow * iWidth) + iColumn] = ((rand() % 6 ) == 0);
/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/add-ons/screen_savers/icons/
H A DIconDisplay.cpp24 #define RAND_BETWEEN(a, b) ((rand() % ((b) - (a) + 1) + (a)))
/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/add-ons/tracker/iconvader/
H A DIconVader.cpp102 location.x += ((rand() % 20) - 10);
103 location.y += ((rand() % 20) - 10);
/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/apps/sudoku/
H A DSudokuGenerator.cpp77 x = rand() % field.Size();
78 y = rand() % field.Size();
87 value = rand() % field.Size();
102 field.SetTo(solver.SolutionAt(rand() % solver.CountSolutions()));
124 x = rand() % field.Size();
125 y = rand() % field.Size();
/haiku/src/bin/pc/
H A Dpc.c181 else if (strcmp(name, "rand") == 0)
182 *val = (ULONG)rand();
/haiku/src/bin/unzip/
H A Dcrypt.c45 the crypthead() function. The standard rand() library function is
48 seed value as argument to determine the starting point of the rand()
58 standard UNIX C runtime library functions: time(), rand(), srand().
69 most implementations of rand() and srand(), only the lower 16 bits are
185 * output of rand() to get less predictability, since rand() is
193 c = (rand() >> 7) & 0xff;
H A Dcryptf.c48 the crypthead() function. The standard rand() library function is
51 seed value as argument to determine the starting point of the rand()
61 standard UNIX C runtime library functions: time(), rand(), srand().
72 most implementations of rand() and srand(), only the lower 16 bits are
188 * output of rand() to get less predictability, since rand() is
196 c = (rand() >> 7) & 0xff;
/haiku/src/libs/uuid/
H A Dgen_uuid.c59 #define rand() random() macro
99 rand();
133 *cp++ ^= (rand() >> 7) & 0xFF;
/haiku/src/preferences/repositories/
H A DRepositoriesView.cpp480 fLastCompletedTimerId = rand();
/haiku/src/servers/app/stackandtile/
H A DSATWindow.cpp482 int16 randNumber = rand();
/haiku/src/system/libroot/posix/glibc/stdlib/
H A Dstdlib.h126 /* The largest number rand will return (same as INT_MAX). */
421 The `rand' and `srand' functions are required by the ANSI standard.
474 extern int rand (void) __THROW;
/haiku/src/tests/add-ons/kernel/file_systems/bfs/array/
H A DsmallArray.cpp25 array->Insert(rand());
28 int32 index = int32(1.0 * rand() * array->count / RAND_MAX);
/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/add-ons/opengl/fake_renderer/
H A DFakeRenderer.cpp75 fDrawColor = make_color(rand() % 0xFF, rand() % 0xFF, rand() % 0xFF);
/haiku/src/tests/kits/app/bmessage/
H A DMessageSpeedTest.cpp85 search << rand() % count; \
/haiku/src/tests/kits/interface/
H A DPulseTest.cpp11 color.red = rand() % 255;
12 color.green = rand() % 255;
/haiku/src/tests/kits/interface/layout/
H A DLayoutTest1.cpp1531 int length = rand() % 20;
/haiku/src/tests/kits/media/nodetest/
H A DConsumerNode.cpp226 snooze((rand() * 100) % 200000);

Completed in 182 milliseconds

123