Home
last modified time | relevance | path

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

1234

/third_party/gstreamer/gstreamer/tests/benchmarks/
Dgstpollstress.c47 random = (gint) (10.0 * rand () / (RAND_MAX + 1.0)); in mess_some_more()
60 if ((gint) (10.0 * rand () / (RAND_MAX + 1.0)) < 2) { in mess_some_more()
99 random = removed + (gint) (2.0 * rand () / (RAND_MAX + 1.0)); in mess_some_more()
/third_party/ltp/testcases/network/stress/ns-tools/
Dns-icmpv4_sender.c442 rand_val = rand() / ((RAND_MAX + 1U) / 16); in thrust_fakes()
450 rand_val = rand() / ((RAND_MAX + 1U) / 3); in thrust_fakes()
458 rand_val = rand() / ((RAND_MAX + 1U) / 3); in thrust_fakes()
466 rand_val = rand() / ((RAND_MAX + 1U) / 3); in thrust_fakes()
478 rand_val = rand() / ((RAND_MAX + 1U) / 5); in thrust_fakes()
498 rand() / ((RAND_MAX + 1U) / 0x100); in thrust_fakes()
Dns-common.c207 last = RAND_MAX < (unsigned int)last ? RAND_MAX : last; in rand_within()
210 rand_val = rand() / ((RAND_MAX + 1U) / num) + first; in rand_within()
232 rand_val = rand() / ((RAND_MAX + 1U) / (bitsize + oversize)); in bit_change_seed()
Dns-icmpv6_sender.c658 rand_val = rand() / ((RAND_MAX + 1U) / 5); in thrust_fakes()
678 rand() / ((RAND_MAX + 1U) / 0x100); in thrust_fakes()
695 rand_val = rand() / ((RAND_MAX + 1U) / 4); in thrust_fakes()
/third_party/skia/third_party/externals/freetype/src/psaux/
Dpsread.c59 return (double)rand() / RAND_MAX < .00; in randomError2()
66 return (double)rand() / RAND_MAX < .00 ? rand() : 0; in randomValue()
/third_party/vk-gl-cts/external/openglcts/modules/glesext/gpu_shader5/
DesextcGPUShader5FmaPrecision.cpp419 a = static_cast<float>(randomFormula(RAND_MAX)) / in generateData()
420 (static_cast<float>(static_cast<float>(RAND_MAX) / static_cast<float>(m_amplitude * 2.0f))) - in generateData()
422 b = static_cast<float>(randomFormula(RAND_MAX)) / in generateData()
423 (static_cast<float>(static_cast<float>(RAND_MAX) / static_cast<float>(m_amplitude * 2.0f))) - in generateData()
425 c = static_cast<float>(randomFormula(RAND_MAX)) / in generateData()
426 (static_cast<float>(static_cast<float>(RAND_MAX) / static_cast<float>(m_amplitude * 2.0f))) - in generateData()
/third_party/glfw/examples/
Dheightmap.c294 *center_x = (MAP_SIZE * rand()) / (1.0f * RAND_MAX); in generate_heightmap__circle()
295 *center_y = (MAP_SIZE * rand()) / (1.0f * RAND_MAX); in generate_heightmap__circle()
296 *size = (MAX_CIRCLE_SIZE * rand()) / (1.0f * RAND_MAX); in generate_heightmap__circle()
297 sign = (1.0f * rand()) / (1.0f * RAND_MAX); in generate_heightmap__circle()
299 *displacement = (sign * (MAX_DISPLACEMENT * rand())) / (1.0f * RAND_MAX); in generate_heightmap__circle()
Dboing.c109 #ifndef RAND_MAX
110 #define RAND_MAX 4095 macro
395 ball_x_inc = -0.5f - 0.75f * (GLfloat)rand() / (GLfloat)RAND_MAX; in BounceBall()
400 ball_x_inc = 0.5f + 0.75f * (GLfloat)rand() / (GLfloat)RAND_MAX; in BounceBall()
407 ball_y_inc = -0.75f - 1.f * (GLfloat)rand() / (GLfloat)RAND_MAX; in BounceBall()
411 ball_y_inc = 0.75f + 1.f * (GLfloat)rand() / (GLfloat)RAND_MAX; in BounceBall()
/third_party/libcoap/src/
Dcoap_prng.c72 #define RAND_BYTES (RAND_MAX >= 0xffffff ? 3 : (RAND_MAX >= 0xffff ? 2 : 1)) in coap_prng_default()
/third_party/node/lib/internal/crypto/
Drandom.js198 const RAND_MAX = 0xFFFF_FFFF_FFFF; constant
241 if (!(range <= RAND_MAX)) {
243 `<= ${RAND_MAX}`, range);
249 const randLimit = RAND_MAX - (RAND_MAX % range);
/third_party/skia/tests/
DPathOpsCubicIntersectionTest.cpp479 cubic1.fPts[i].fX = static_cast<double>(SK_RAND(seed)) / RAND_MAX * 100; in CubicIntersection_RandTest()
480 cubic1.fPts[i].fY = static_cast<double>(SK_RAND(seed)) / RAND_MAX * 100; in CubicIntersection_RandTest()
481 cubic2.fPts[i].fX = static_cast<double>(SK_RAND(seed)) / RAND_MAX * 100; in CubicIntersection_RandTest()
482 cubic2.fPts[i].fY = static_cast<double>(SK_RAND(seed)) / RAND_MAX * 100; in CubicIntersection_RandTest()
/third_party/skia/third_party/externals/oboe/apps/fxlab/app/src/main/cpp/effects/utils/
DWhiteNoise.h27 r_1 = (static_cast <float> (rand()) / static_cast <float> (RAND_MAX)) * 2 - 1; in operator()
/third_party/gstreamer/gstplugins_good/gst/goom/
Dgoom_tools.c43 #if RAND_MAX < 0x10000 in goom_random_update_array()
/third_party/glfw/tests/
Dtimeout.c51 return (float) rand() / (float) RAND_MAX; in nrand()
Dempty.c70 return (float) rand() / (float) RAND_MAX; in nrand()
/third_party/ninja/src/
Dhash_collision_bench.cc25 return int(low + (rand() / double(RAND_MAX)) * (high - low) + 0.5); in random()
/third_party/libsnd/tests/
Dgenerate.c54 { return rand () / (0.5f * (float) RAND_MAX) - 1.0f ; in rand_float()
/third_party/pulseaudio/src/tests/
Drtstutter.c82 … (uint64_t) ((((double) rand())*(double)(msec_upper-msec_lower)*PA_USEC_PER_MSEC)/RAND_MAX) + in work()
/third_party/mesa3d/src/gallium/drivers/llvmpipe/
Dlp_test_main.c196 value = (double)rand()/(double)RAND_MAX; in random_elem()
248 return (float)((double)rand()/(double)RAND_MAX); in random_float()
/third_party/jerryscript/jerry-core/ecma/builtin-objects/
Decma-builtin-math.c325 const ecma_number_t rand_max = (ecma_number_t) RAND_MAX; in ecma_builtin_math_object_random()
326 const ecma_number_t rand_max_min_1 = (ecma_number_t) (RAND_MAX - 1); in ecma_builtin_math_object_random()
/third_party/ltp/testcases/kernel/ipc/semaphore/
Dsem01.c80 delay = 1 + ((100.0 * rand()) / RAND_MAX); in delayloop()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/
D23-1.c70 msec = (int)(20.0 * rand() / RAND_MAX); in child_func()
/third_party/skia/third_party/externals/microhttpd/src/testcurl/https/
Dtest_https_get_parallel.c62 usleep ((useconds_t) 10.0 * ((double) rand ()) / ((double) RAND_MAX)); in https_transfer_thread_adapter()
Dtest_https_get_parallel_threads.c63 usleep ((useconds_t) 10.0 * ((double) rand ()) / ((double) RAND_MAX)); in https_transfer_thread_adapter()
/third_party/ltp/testcases/kernel/mem/mem/
Dmem02.c210 size = (int)((rand() / (float)RAND_MAX) * 100000) + 1; in main()

1234