---------------------------------------------------------------------------------- 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 ----------------------------------------------------------------------------
| 168 | // Tr2ParticleSystem::RandCheap |
| 169 | // ---------------------------------------------------------------------------------- |
| 170 | static inline float RandFloat() |
| 171 | { |
| 172 | uint32_t r = RandCheap() & 0x7FFFFFFF; |
| 173 | return float( r ) / float( 0x7FFFFFFF ); |
| 174 | } |
| 175 | |
| 176 | private: |
| 177 | void UpdateSimulation( const ITr2GenericEmitter::UpdateArguments& arguments, float dt ); |
no test coverage detected