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

Method RandomSeed

Common/Core/vtkMath.cxx:106–109  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Initialize seed value. NOTE: Random() has the bad property that the first random number returned after RandomSeed() is called is proportional to the seed value! To help solve this, call RandomSeed() a few times inside seed. This doesn't ruin the repeatability of Random().

Source from the content-addressed store, hash-verified

104// RandomSeed() a few times inside seed. This doesn't ruin the
105// repeatability of Random().
106void vtkMath::RandomSeed(int s)
107{
108 vtkMath::Internal->Uniform->SetSeed(s);
109}
110
111//------------------------------------------------------------------------------
112// Description:

Callers 15

__init__Method · 0.45
SetRandomSeedFunction · 0.45
mainFunction · 0.45
MakeColorsFunction · 0.45
MakeColorsFunction · 0.45

Calls 1

SetSeedMethod · 0.45

Tested by 9

__init__Method · 0.36
SetRandomSeedFunction · 0.36
mainFunction · 0.36
MakeColorsFunction · 0.36
MakeColorsFunction · 0.36
MakeColorsFunction · 0.36
MakeColorsFunction · 0.36
uniformFnFunction · 0.36
MakeColorsFunction · 0.36