geRandom

From GriffinEngine
Jump to: navigation, search

Usage

A random number generator. Also creates random float3s and float2s for particle systems.

Reference

Fields

  •   enum Axis { X = 1, Y = 2, Z = 4, NONE = 0, ALL = 7 };

Accessors

  • virtual int getId() = 0

Methods

  •  static int RandomInt(int min = 0, int max = RAND_MAX);  //Returns an Integer from min to max
  •  static int RandomSign(); // Returns 1 or -1
  •  static double RandomDouble(int order = 1); //Returns a random number from 0 to 1 * 10 ^ order
  •  static float2& RandomVector2(Axis freedom = (Axis)2, float max = 1);
  •  static float3& RandomVector3(Axis freedom = (Axis)4, float max = 1);
  •  static void Initialize();