VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes
VisiMath.RandomGenerator Class Reference

Encapsulated standard .NET random generator. More...

List of all members.

## Public Member Functions
| RandomGenerator ()
| Creates random generator with seed based on current time.
| RandomGenerator (int seed)
| Creates randomg generator with specified seed.
float | GetFloat ()
| Returns float number 0.0 to 1.0.
float | GetFloatScaled (float scale)
| Returns scaled float number 0 to scale.
float | GetFloat (float min, float max)
| Returns float number from minimum to maximum.
int | GetInt (int max)
| Returns int random number from zero to (max-1)
int | GetInt ()
| Returns random positive int number.
int | GetInt (int minimum, int maximum)
| Returns random positive from minimum to maximum -1.
byte | GetByte ()
| Returns random byte.
float | GetBinomial (float scale=1)
| Returns binomial float number.
Vector2 | GetVector2 (float scale=1, bool normalized=false)
| Returns random Vector.
Vector3 | GetVector3 (float scale=1, bool normalized=false)
| Returns random Vector.
Vector4 | GetVector4 (float scale=1, bool normalized=false)
| Returns random Vector.
Vector2 | GetVector2 (Vector2 scale)
| Returns random Vector.
Vector3 | GetVector3 (Vector3 scale)
| Returns random Vector.
Vector4 | GetVector4 (Vector4 scale)
| Returns random Vector.
Vector2 | GetVector2 (ref Vector2 scale)
| Returns random Vector.
Vector3 | GetVector3 (ref Vector3 scale)
| Returns random Vector.
Vector4 | GetVector4 (ref Vector4 scale)
| Returns random Vector.
Vector2 | GetVector2 (Vector2 min, Vector2 max)
| Returns random Vector with values from min to max.
Vector3 | GetVector3 (Vector3 min, Vector3 max)
| Returns random Vector with values from min to max.
Vector4 | GetVector4 (Vector4 min, Vector4 max)
| Returns random Vector with values from min to max.
Vector2 | GetVector2 (ref Vector2 min, ref Vector2 max)
| Returns random Vector with values from min to max.
Vector3 | GetVector3 (ref Vector3 min, ref Vector3 max)
| Returns random Vector with values from min to max.
Vector4 | GetVector4 (ref Vector4 min, ref Vector4 max)
| Returns random Vector with values from min to max.
Quaternion | GetQuaternion ()
| Returns random quaternion rotation.
## Protected Attributes
Random | _rnd
| Internal standard NET random generator.

## Detailed Description

Encapsulated standard .NET random generator.

## Constructor & Destructor Documentation

VisiMath.RandomGenerator.RandomGenerator | ( |  | ) |

Creates random generator with seed based on current time.

VisiMath.RandomGenerator.RandomGenerator | ( | int | seed | ) |

Creates randomg generator with specified seed.

Parameters:

  seed | RGEN seed

## Member Function Documentation

float VisiMath.RandomGenerator.GetBinomial | ( | float | scale = `1` | ) |

Returns binomial float number.

Parameters:

  scale |

Returns:
  random number

byte VisiMath.RandomGenerator.GetByte | ( |  | ) |

Returns random byte.

Returns:
  random number

float VisiMath.RandomGenerator.GetFloat | ( |  | ) |

Returns float number 0.0 to 1.0.

Returns:
  random number

float VisiMath.RandomGenerator.GetFloat | ( | float | min,
|  | float | max
| ) |  |

Returns float number from minimum to maximum.

Parameters:

  min | Minimal possible value
  max | Maximal possible value

Returns:
  random number

float VisiMath.RandomGenerator.GetFloatScaled | ( | float | scale | ) |

Returns scaled float number 0 to scale.

Parameters:

  scale | scale

Returns:
  random number

int VisiMath.RandomGenerator.GetInt | ( | int | max | ) |

Returns int random number from zero to (max-1)

Parameters:

  max | maximal number

Returns:
  random number

int VisiMath.RandomGenerator.GetInt | ( |  | ) |

Returns random positive int number.

Returns:
  random number

int VisiMath.RandomGenerator.GetInt | ( | int | minimum,
|  | int | maximum
| ) |  |

Returns random positive from minimum to maximum -1.

Returns:
  random number

Quaternion VisiMath.RandomGenerator.GetQuaternion | ( |  | ) |

Returns random quaternion rotation.

Returns:
  Random rotation

Vector2 VisiMath.RandomGenerator.GetVector2 | ( | Vector2 | scale | ) |

Returns random Vector.

Parameters:

  scale | Required scale

Returns:
  Random vector

Vector2 VisiMath.RandomGenerator.GetVector2 | ( | float | scale = `1`,
|  | bool | normalized = `false`
| ) |  |

Returns random Vector.

Parameters:

  scale | Required scale
  normalized | if true, vector will be normalized

Returns:
  Random vector

Vector2 VisiMath.RandomGenerator.GetVector2 | ( | Vector2 | min,
|  | Vector2 | max
| ) |  |

Returns random Vector with values from min to max.

Parameters:

  max | maximal possible values for axes
  min | minimal possible values for axes

Returns:
  Random vector

Vector2 VisiMath.RandomGenerator.GetVector2 | ( | ref Vector2 | min,
|  | ref Vector2 | max
| ) |  |

Returns random Vector with values from min to max.

Parameters:

  max | maximal possible values for axes
  min | minimal possible values for axes

Returns:
  Random vector

Vector2 VisiMath.RandomGenerator.GetVector2 | ( | ref Vector2 | scale | ) |

Returns random Vector.

Parameters:

  scale | Required scale

Returns:
  Random vector

Vector3 VisiMath.RandomGenerator.GetVector3 | ( | Vector3 | scale | ) |

Returns random Vector.

Parameters:

  scale | Required scale

Returns:
  Random vector

Vector3 VisiMath.RandomGenerator.GetVector3 | ( | float | scale = `1`,
|  | bool | normalized = `false`
| ) |  |

Returns random Vector.

Parameters:

  scale | Required scale
  normalized | if true, vector will be normalized

Returns:
  Random vector

Vector3 VisiMath.RandomGenerator.GetVector3 | ( | ref Vector3 | scale | ) |

Returns random Vector.

Parameters:

  scale | Required scale

Returns:
  Random vector

Vector3 VisiMath.RandomGenerator.GetVector3 | ( | ref Vector3 | min,
|  | ref Vector3 | max
| ) |  |

Returns random Vector with values from min to max.

Parameters:

  max | maximal possible values for axes
  min | minimal possible values for axes

Returns:
  Random vector

Vector3 VisiMath.RandomGenerator.GetVector3 | ( | Vector3 | min,
|  | Vector3 | max
| ) |  |

Returns random Vector with values from min to max.

Parameters:

  max | maximal possible values for axes
  min | minimal possible values for axes

Returns:
  Random vector

Vector4 VisiMath.RandomGenerator.GetVector4 | ( | float | scale = `1`,
|  | bool | normalized = `false`
| ) |  |

Returns random Vector.

Parameters:

  scale | Required scale
  normalized | if true, vector will be normalized

Returns:
  Random vector

Vector4 VisiMath.RandomGenerator.GetVector4 | ( | Vector4 | scale | ) |

Returns random Vector.

Parameters:

  scale | Required scale

Returns:
  Random vector

Vector4 VisiMath.RandomGenerator.GetVector4 | ( | Vector4 | min,
|  | Vector4 | max
| ) |  |

Returns random Vector with values from min to max.

Parameters:

  max | maximal possible values for axes
  min | minimal possible values for axes

Returns:
  Random vector

Vector4 VisiMath.RandomGenerator.GetVector4 | ( | ref Vector4 | scale | ) |

Returns random Vector.

Parameters:

  scale | Required scale

Returns:
  Random vector

Vector4 VisiMath.RandomGenerator.GetVector4 | ( | ref Vector4 | min,
|  | ref Vector4 | max
| ) |  |

Returns random Vector with values from min to max.

Parameters:

  max | maximal possible values for axes
  min | minimal possible values for axes

Returns:
  Random vector

## Member Data Documentation

Random VisiMath.RandomGenerator._rnd`[protected]`

Internal standard NET random generator.

The documentation for this class was generated from the following file:

- RandomGenerator.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events