Lines Matching defs:min
686 inline T getRandom (deRandom& rnd, T min, T max);
689 inline GLValue::Float getRandom (deRandom& rnd, GLValue::Float min, GLValue::Float max)
691 if (max < min)
692 return min;
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)
700 if (max < min)
701 return min;
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)
709 if (max < min)
710 return min;
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)
718 if (max < min)
719 return min;
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)
727 if (max < min)
728 return min;
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)
736 if (max < min)
737 return min;
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)
745 if (max < min)
746 return min;
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)
754 if (max < min)
755 return min;
758 float fMin = min.to<float>();
764 inline GLValue::Int getRandom (deRandom& rnd, GLValue::Int min, GLValue::Int max)
766 if (max < min)
767 return min;
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)
775 if (max < min)
776 return min;
778 return GLValue::Uint::create((min == max ? min : min + (deRandom_getUint32(&rnd) % (max.to<deUint32>() - min.to<deUint32>()))));
1534 static char* generateIndices (int seed, int elementCount, DrawTestSpec::IndexType type, int offset, int min, int max, int indexBase);
1539 static char* createIndices (int seed, int elementCount, int offset, int min, int max, int indexBase);
1591 const GLType min = extractGLValue<GLType>(GLValue::getMinValue(GLValueTypeTraits<GLType>::Type));
1612 components[componentNdx] = getRandom<GLType>(rnd, min, max);
1618 components[componentNdx] = getRandom<GLType>(rnd, min, max);
1669 char* RandomArrayGenerator::generateIndices (int seed, int elementCount, DrawTestSpec::IndexType type, int offset, int min, int max, int indexBase)
1676 data = createIndices<deUint8>(seed, elementCount, offset, min, max, indexBase);
1680 data = createIndices<deUint16>(seed, elementCount, offset, min, max, indexBase);
1684 data = createIndices<deUint32>(seed, elementCount, offset, min, max, indexBase);
1696 char* RandomArrayGenerator::createIndices (int seed, int elementCount, int offset, int min, int max, int indexBase)
1712 if (min < 0 || (size_t)min > std::numeric_limits<T>::max() ||
1714 min > max)
1719 deUint32 ndx = getRandom(rnd, GLValue::Uint::create(min), GLValue::Uint::create(max)).getValue();
1722 // generation of degenerate triangles and lines. If [min, max] is too
1726 if (ndx > (deUint32)max) ndx = min;
1728 if (ndx > (deUint32)max) ndx = min;
1730 if (ndx > (deUint32)max) ndx = min;
3127 const int renderTargetWidth = de::min(MAX_RENDER_TARGET_SIZE, m_renderCtx.getRenderTarget().getWidth());
3128 const int renderTargetHeight = de::min(MAX_RENDER_TARGET_SIZE, m_renderCtx.getRenderTarget().getHeight());