As an example, I have a module called "Random" in my game engine, exposed to Angelscript as a global, which can generally be treated like an overloaded function to generate random numbers with various parameters. Additional Random objects can also be created for deterministic simulations and the like, so I'd be losing some functionality if I just exposed this stuff as global functions.

class Random { public: Uint32 operator()(Uint32 max); Uint32 operator()(Uint32 min, Uint32 max); Sint32 operator()(Sint32 max); Sint32 operator()(Sint32 min, Sint32 max); float operator()(float max); float operator()(float min, float max); double operator()(double max); double operator()(double min, double max); // Normal distribution float normal(float mean, float deviation); // Exponential normal distribution float normalExp(float mean, float multDeviation); // ... };

Is this something that is likely to be added to Angelscript in the future, or would it throw a wrench in the design?

**Edited by cellulose, 21 June 2012 - 11:38 AM.**