/haiku/headers/private/kernel/util/ |
H A D | Random.h | 44 T random = 0; local 46 random |= (T)fast_random_value() << shift; 50 return random; 59 T random = 0; local 61 random |= (T)random_value() << shift; 65 return random; 74 T random = 0; local 76 random |= (T)secure_random_value() << shift; 80 return random;
|
/haiku/src/system/kernel/util/ |
H A D | Random.cpp | 83 uint32 random = sFastLast * 1103515245 + 12345; local 84 sFastLast = random; 85 return (random >> 16) & 0x7fff; 101 int32 random = 16807 * lo - 2836 * hi; local 102 if (random <= 0) 103 random += MAX_RANDOM_VALUE; 104 sLast = random; 105 return random % (MAX_RANDOM_VALUE + 1); 124 uint32 random = hash(data); local 125 sSecureLast = random; [all...] |
/haiku/src/apps/mediaplayer/playlist/ |
H A D | RandomizePLItemsCommand.h | 29 status_t _Sort(bool random);
|
H A D | RandomizePLItemsCommand.cpp | 59 // remove the indices from the set in random order 107 RandomizePLItemsCommand::_Sort(bool random) argument 121 if (random) {
|
/haiku/src/libs/compat/freebsd_network/compat/sys/ |
H A D | libkern.h | 15 extern int random(void);
|
/haiku/src/tests/kits/shared/ |
H A D | FakeJsonDataGenerator.cpp | 150 fItemBufferSize = random() % kTextDataLength; 212 int32 value = static_cast<int32>(random());
|
/haiku/src/add-ons/screen_savers/flurry/ |
H A D | Shared.h | 56 #define random() rand() macro
|
H A D | Texture.cpp | 77 while (speck <= 32 && random() % 2) { 83 while (speck <= 32 && random() % 2) {
|
H A D | Spark.cpp | 82 a = ((float)(random() % 3600)) / 10.0f; 87 a = 2.0f + (float) (random() & 255) * c;
|
H A D | Smoke.cpp | 160 = (random() & 63);
|
/haiku/3rdparty/mmu_man/irc/Haiku/ |
H A D | plugin.py | 37 import random namespace 95 Returns a random haiku. 99 h = self.fortunes[int(random.random() * len(self.fortunes))].split('\n')
|
/haiku/src/kits/support/ |
H A D | Uuid.cpp | 124 fd = open("/dev/random", O_RDONLY); 144 uint32 value = random(); 151 // random() returns 31 bit numbers only, so we move a few bits from where
|
/haiku/src/system/libroot/posix/stdlib/ |
H A D | random.c | 36 * random.c: 38 * An improved random number generation package. In addition to the standard 42 * then initialized to contain information for random number generation with 47 * information and generates far better random numbers than a linear 59 * The random number generation technique is a linear feedback shift register 66 * influenced by pseudo-random carries out of the lower bits. The total 87 * state information and generates far better random numbers than a linear 95 * For each of the currently supported random number generators, we have a 97 * many bytes of state info to support this random number generator), a degree 165 * could get away with just one pointer, but the code for random() i 421 random(void) function [all...] |
/haiku/src/tests/kits/game/ParticlesII/ |
H A D | particlesII.cpp | 291 particle_list[i].init_velocity = -((double)((rand_max>>1)+(random()%(rand_max>>1)))/rand_max)*3.333; // magic number 292 particle_list[i].gravity = -(((double)((rand_max>>1)+(random()%(rand_max>>1)))/rand_max))*0.599; // more magic 294 // make the particle initialy invisible and fixed, but at a random moment in time 298 particle_list[i].timeval = random() & 64; 301 particle_list[i].cos_z_theta = cos(random() % 360); // grab an angle
|
/haiku/src/system/kernel/vm/ |
H A D | VMUserAddressSpace.cpp | 435 addr_t random = secure_get_random<addr_t>(); local 436 random %= range; 437 random &= ~addr_t(alignment - 1); 439 return start + random;
|
/haiku/src/libs/libtelnet/ |
H A D | pk.c | 149 seed[i] = random() & 0xff; 154 * Generate a random public/secret key pair
|
/haiku/headers/posix/ |
H A D | stdlib.h | 23 /* random data structures (for thread-safe random numbers) */ 103 /* random number generation */ 106 extern int random(void);
|
/haiku/headers/libs/mapm/ |
H A D | m_apm.h | 582 static MAPM random(void) function in class:MAPM 618 inline MAPM get_random(void) {return MAPM::random();}
|
/haiku/src/preferences/backgrounds/ |
H A D | BackgroundImage.cpp | 166 result->fShowingImageSet = random() % result->fImageSetCount; 547 fShowingImageSet = random()%fImageSetCount;
|
/haiku/src/libs/uuid/ |
H A D | gen_uuid.c | 59 #define rand() random() 83 fd = open("/dev/random", O_RDONLY | O_NONBLOCK); 96 /* Crank the random number generator a few times */ 105 * Generate a series of random bytes. Use /dev/urandom if possible, 106 * and if not, use srandom/random. 130 * randomness if /dev/random/urandom is out to lunch. 441 /* No real reason to use the daemon for random uuid's -- yet */ 447 * Check whether good random source (/dev/random or /dev/urandom) 454 return (!stat("/dev/random", [all...] |
/haiku/src/add-ons/screen_savers/ifs/ |
H A D | IFS.cpp | 35 #define random() ya_random() macro 39 #define LRAND() ((long) (random() & 0x7fffffff)) 46 // The following 'random' numbers are taken from CRC, 18th Edition, page 622.
|
/haiku/src/system/libroot/posix/glibc/stdlib/ |
H A D | stdlib.h | 419 /* These are the functions that actually do things. The `random', `srandom', 422 We provide both interfaces to the same random number generator. */ 423 /* Return a random long integer between 0 and RAND_MAX inclusive. */ 424 extern long int random (void) __THROW; 426 /* Seed the random number generator with the given number. */ 429 /* Initialize the random number generator to use state buffer STATEBUF, 436 /* Switch the random number generator to state buffer STATEBUF, 442 /* Reentrant versions of the `random' family of functions. 451 int rand_type; /* Type of random number generator. */ 452 int rand_deg; /* Degree of random numbe [all...] |
/haiku/src/add-ons/kernel/drivers/network/ether/broadcom570x/dev/bce/ |
H A D | if_bcereg.h | 418 /* Needed for random() function which is only used in debugging. */ 419 #include <sys/random.h> 422 #define DB_RANDOMFALSE(defects) (random() > defects) 423 #define DB_OR_RANDOMFALSE(defects) || (random() > defects) 424 #define DB_AND_RANDOMFALSE(defects) && (random() > defects) 427 #define DB_RANDOMTRUE(defects) (random() < defects) 428 #define DB_OR_RANDOMTRUE(defects) || (random() < defects) 429 #define DB_AND_RANDOMTRUE(defects) && (random() < defects)
|
/haiku/src/system/libroot/stubbed/ |
H A D | libroot_stubs.c | 2305 void random() {} function
|
H A D | libroot_stubs_legacy.c | 2284 void random() {} function
|