MCPcopy Create free account
hub / github.com/carbonengine/trinity / RandFloat

Function RandFloat

trinity/Particle/Tr2ParticleSystem.h:170–174  ·  view source on GitHub ↗

---------------------------------------------------------------------------------- Description: A cheap thread-safe lock-free pseudo random number generator that produces random floats in [0, 1] range. Based on Tr2ParticleSystem::RandCheap. Return Value: Random float between 0 and 1. See also: Tr2ParticleSystem::RandCheap ----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

168 // Tr2ParticleSystem::RandCheap
169 // ----------------------------------------------------------------------------------
170 static inline float RandFloat()
171 {
172 uint32_t r = RandCheap() & 0x7FFFFFFF;
173 return float( r ) / float( 0x7FFFFFFF );
174 }
175
176private:
177 void UpdateSimulation( const ITr2GenericEmitter::UpdateArguments& arguments, float dt );

Callers 7

ApplyConstraintMethod · 0.85
ApplyConstraintMethod · 0.85
GenerateMethod · 0.85
frandFunction · 0.85
frandFunction · 0.85
GenerateMethod · 0.85
GenerateMethod · 0.85

Calls 1

RandCheapFunction · 0.85

Tested by

no test coverage detected