Lines Matching defs:rnd

220 inline T getRandom (deRandom& rnd, T min, T max);
223 inline GLValue::Float getRandom (deRandom& rnd, GLValue::Float min, GLValue::Float max)
228 return GLValue::Float::create(min + deRandom_getFloat(&rnd) * (max.to<float>() - min.to<float>()));
232 inline GLValue::Short getRandom (deRandom& rnd, GLValue::Short min, GLValue::Short max)
237 return GLValue::Short::create((min == max ? min : (deInt16)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
241 inline GLValue::Ushort getRandom (deRandom& rnd, GLValue::Ushort min, GLValue::Ushort max)
246 return GLValue::Ushort::create((min == max ? min : (deUint16)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
250 inline GLValue::Byte getRandom (deRandom& rnd, GLValue::Byte min, GLValue::Byte max)
255 return GLValue::Byte::create((min == max ? min : (deInt8)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
259 inline GLValue::Ubyte getRandom (deRandom& rnd, GLValue::Ubyte min, GLValue::Ubyte max)
264 return GLValue::Ubyte::create((min == max ? min : (deUint8)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
268 inline GLValue::Fixed getRandom (deRandom& rnd, GLValue::Fixed min, GLValue::Fixed max)
273 return GLValue::Fixed::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
277 inline GLValue::Half getRandom (deRandom& rnd, GLValue::Half min, GLValue::Half max)
284 GLValue::Half h = GLValue::Half::create(fMin + deRandom_getFloat(&rnd) * (fMax - fMin));
289 inline GLValue::Int getRandom (deRandom& rnd, GLValue::Int min, GLValue::Int max)
294 return GLValue::Int::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
298 inline GLValue::Uint getRandom (deRandom& rnd, GLValue::Uint min, GLValue::Uint max)
303 return GLValue::Uint::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
307 inline GLValue::Double getRandom (deRandom& rnd, GLValue::Double min, GLValue::Double max)
312 return GLValue::Double::create(min + deRandom_getFloat(&rnd) * (max.to<float>() - min.to<float>()));
1245 static void setData (char* data, Array::InputType type, deRandom& rnd, GLValue min, GLValue max);
1248 void RandomArrayGenerator::setData (char* data, Array::InputType type, deRandom& rnd, GLValue min, GLValue max)
1254 alignmentSafeAssignment<float>(data, getRandom<GLValue::Float>(rnd, min.fl, max.fl));
1260 alignmentSafeAssignment<double>(data, getRandom<GLValue::Float>(rnd, min.fl, max.fl));
1266 alignmentSafeAssignment<deInt16>(data, getRandom<GLValue::Short>(rnd, min.s, max.s));
1272 alignmentSafeAssignment<deUint16>(data, getRandom<GLValue::Ushort>(rnd, min.us, max.us));
1278 alignmentSafeAssignment<deInt8>(data, getRandom<GLValue::Byte>(rnd, min.b, max.b));
1284 alignmentSafeAssignment<deUint8>(data, getRandom<GLValue::Ubyte>(rnd, min.ub, max.ub));
1290 alignmentSafeAssignment<deInt32>(data, getRandom<GLValue::Fixed>(rnd, min.fi, max.fi));
1296 alignmentSafeAssignment<deInt32>(data, getRandom<GLValue::Int>(rnd, min.i, max.i));
1302 alignmentSafeAssignment<deUint32>(data, getRandom<GLValue::Uint>(rnd, min.ui, max.ui));
1308 alignmentSafeAssignment<deFloat16>(data, getRandom<GLValue::Half>(rnd, min.h, max.h).getValue());
1322 deRandom rnd;
1323 deRandom_init(&rnd, seed);
1334 setData(&(data[vertexNdx * stride + Array::inputTypeSize(type) * componentNdx]), type, rnd, min, max);
1427 deRandom rnd;
1428 deRandom_init(&rnd, seed);
1436 deUint32 x1 = min + deRandom_getUint32(&rnd) % (max - min);
1437 deUint32 x2 = min + deRandom_getUint32(&rnd) % (max - x1);
1439 deUint32 y1 = min + deRandom_getUint32(&rnd) % (max - min);
1440 deUint32 y2 = min + deRandom_getUint32(&rnd) % (max - y1);
1442 deUint32 z = min + deRandom_getUint32(&rnd) % (max - min);
1443 deUint32 w = deRandom_getUint32(&rnd) % max2;
1504 deRandom rnd;
1505 deRandom_init(&rnd, seed);
1523 x1 = roundTo(minDiff, getRandom<T>(rnd, min, maxRounded - minDiff));
1524 x2 = roundTo(minDiff, getRandom<T>(rnd, x1 + minDiff, maxRounded));
1526 y1 = roundTo(minDiff, getRandom<T>(rnd, min, maxRounded - minDiff));
1527 y2 = roundTo(minDiff, getRandom<T>(rnd, y1 + minDiff, maxRounded));
1533 z = (componentCount > 2) ? roundTo(minDiff, (getRandom<T>(rnd, min, max))) : (T::create(0));
1534 w = (componentCount > 3) ? roundTo(minDiff, (getRandom<T>(rnd, min, max))) : (T::create(1));
1639 deRandom rnd;
1640 deRandom_init(&rnd, seed);
1666 T val = getRandom<T>(rnd, min, max);