Lines Matching defs:rnd

686 inline T getRandom (deRandom& rnd, T min, T max);
689 inline GLValue::Float getRandom (deRandom& rnd, GLValue::Float min, GLValue::Float max)
694 return GLValue::Float::create(min + deRandom_getFloat(&rnd) * (max.to<float>() - min.to<float>()));
698 inline GLValue::Double getRandom (deRandom& rnd, GLValue::Double min, GLValue::Double max)
703 return GLValue::Double::create(min + deRandom_getFloat(&rnd) * (max.to<float>() - min.to<float>()));
707 inline GLValue::Short getRandom (deRandom& rnd, GLValue::Short min, GLValue::Short max)
712 return GLValue::Short::create((min == max ? min : (deInt16)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
716 inline GLValue::Ushort getRandom (deRandom& rnd, GLValue::Ushort min, GLValue::Ushort max)
721 return GLValue::Ushort::create((min == max ? min : (deUint16)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
725 inline GLValue::Byte getRandom (deRandom& rnd, GLValue::Byte min, GLValue::Byte max)
730 return GLValue::Byte::create((min == max ? min : (deInt8)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
734 inline GLValue::Ubyte getRandom (deRandom& rnd, GLValue::Ubyte min, GLValue::Ubyte max)
739 return GLValue::Ubyte::create((min == max ? min : (deUint8)(min + (deRandom_getUint32(&rnd) % (max.to<int>() - min.to<int>())))));
743 inline GLValue::Fixed getRandom (deRandom& rnd, GLValue::Fixed min, GLValue::Fixed max)
748 return GLValue::Fixed::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
752 inline GLValue::Half getRandom (deRandom& rnd, GLValue::Half min, GLValue::Half max)
759 GLValue::Half h = GLValue::Half::create(fMin + deRandom_getFloat(&rnd) * (fMax - fMin));
764 inline GLValue::Int getRandom (deRandom& rnd, GLValue::Int min, GLValue::Int max)
769 return GLValue::Int::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
773 inline GLValue::Uint getRandom (deRandom& rnd, GLValue::Uint min, GLValue::Uint max)
778 return GLValue::Uint::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
1603 deRandom rnd;
1604 deRandom_init(&rnd, seed);
1612 components[componentNdx] = getRandom<GLType>(rnd, min, max);
1618 components[componentNdx] = getRandom<GLType>(rnd, min, max);
1651 deRandom rnd;
1652 deRandom_init(&rnd, seed);
1656 const deUint32 x = deRandom_getUint32(&rnd) % limit10;
1657 const deUint32 y = deRandom_getUint32(&rnd) % limit10;
1658 const deUint32 z = deRandom_getUint32(&rnd) % limit10;
1659 const deUint32 w = deRandom_getUint32(&rnd) % limit2;
1707 deRandom rnd;
1708 deRandom_init(&rnd, seed);
1719 deUint32 ndx = getRandom(rnd, GLValue::Uint::create(min), GLValue::Uint::create(max)).getValue();