source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/demos/Standalone/Hierarchical Systems Demo [OpenGL]/RESOURCES/include/random.cpp @ 3255

Revision 3255, 275 bytes checked in by szirmay, 15 years ago (diff)
Line 
1#include "random.h"
2
3double UnitRandom ()
4 {
5         return ((double)rand()) / RAND_MAX;
6 }
7   
8double RangeRandom (double fLow, double fHigh)
9 {
10     return (fHigh-fLow)*UnitRandom() + fLow;
11 }
12
13double SymmetricRandom ()
14 {
15        return 2.0f * UnitRandom() - 1.0f;
16 }
Note: See TracBrowser for help on using the repository browser.