#define RAND_LIMIT 32767 /// Random number in range [-1,1] inline float32 RandomFloat() { float32 r = (float32)(std::rand() & (RAND_LIMIT)); r /= RAND_LIMIT; r = 2.0f * r - 1.0f; return r; }