MCPcopy Create free account
hub / github.com/Kitware/VTK / GetRangeValue

Method GetRangeValue

Common/Core/vtkMinimalStandardRandomSequence.cxx:85–100  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

83
84//------------------------------------------------------------------------------
85double vtkMinimalStandardRandomSequence::GetRangeValue(double rangeMin, double rangeMax)
86{
87 double result;
88 if (rangeMin == rangeMax)
89 {
90 result = rangeMin;
91 }
92 else
93 {
94 result = rangeMin + this->GetValue() * (rangeMax - rangeMin);
95 }
96 assert("post: valid_result" &&
97 ((rangeMin <= rangeMax && result >= rangeMin && result <= rangeMax) ||
98 (rangeMax <= rangeMin && result >= rangeMax && result <= rangeMin)));
99 return result;
100}
101
102//------------------------------------------------------------------------------
103double vtkMinimalStandardRandomSequence::GetNextRangeValue(double rangeMin, double rangeMax)

Callers 5

GetNextRangeValueMethod · 0.95
RandomMethod · 0.80
GenerateRandomSequenceFunction · 0.80
RequestDataMethod · 0.80

Calls 2

GetValueMethod · 0.95
assertFunction · 0.50

Tested by 2

GenerateRandomSequenceFunction · 0.64