Table of Contents

Class RandomUtils

Namespace
HelixToolkit.Maths
Assembly
HelixToolkit.Maths.dll

Random functions on commun types.

public static class RandomUtils
Inheritance
RandomUtils
Inherited Members

Methods

NextColor(Random)

Gets random opaque Color.

public static Color NextColor(this Random random)

Parameters

random Random

Current Random.

Returns

Color

Random Color.

NextColor(Random, float, float)

Gets random opaque Color.

public static Color NextColor(this Random random, float minBrightness, float maxBrightness)

Parameters

random Random

Current Random.

minBrightness float

Minimum brightness.

maxBrightness float

Maximum brightness

Returns

Color

Random Color.

NextColor(Random, float, float, float)

Gets random Color.

public static Color NextColor(this Random random, float minBrightness, float maxBrightness, float alpha)

Parameters

random Random

Current Random.

minBrightness float

Minimum brightness.

maxBrightness float

Maximum brightness

alpha float

Alpha value.

Returns

Color

Random Color.

NextColor(Random, float, float, float, float)

Gets random Color.

public static Color NextColor(this Random random, float minBrightness, float maxBrightness, float minAlpha, float maxAlpha)

Parameters

random Random

Current Random.

minBrightness float

Minimum brightness.

maxBrightness float

Maximum brightness

minAlpha float

Minimum alpha.

maxAlpha float

Maximum alpha.

Returns

Color

Random Color.

NextDouble(Random, double, double)

Gets random double number within range.

public static double NextDouble(this Random random, double min, double max)

Parameters

random Random

Current Random.

min double

Minimum.

max double

Maximum.

Returns

double

Random double number.

NextFloat(Random, float, float)

Gets random float number within range.

public static float NextFloat(this Random random, float min, float max)

Parameters

random Random

Current Random.

min float

Minimum.

max float

Maximum.

Returns

float

Random float number.

NextLong(Random)

Gets random long number.

public static long NextLong(this Random random)

Parameters

random Random

Current Random.

Returns

long

Random long number.

NextLong(Random, long, long)

Gets random long number within range.

public static long NextLong(this Random random, long min, long max)

Parameters

random Random

Current Random.

min long

Minimum.

max long

Maximum.

Returns

long

Random long number.

NextTime(Random, TimeSpan, TimeSpan)

Gets random TimeSpan.

public static TimeSpan NextTime(this Random random, TimeSpan min, TimeSpan max)

Parameters

random Random

Current Random.

min TimeSpan

Minimum.

max TimeSpan

Maximum.

Returns

TimeSpan

Random TimeSpan.

NextVector2(Random, Vector2, Vector2)

Gets random Vector2 within range.

public static Vector2 NextVector2(this Random random, Vector2 min, Vector2 max)

Parameters

random Random

Current Random.

min Vector2

Minimum.

max Vector2

Maximum.

Returns

Vector2

Random Vector2.

NextVector3(Random)

public static Vector3 NextVector3(this Random random)

Parameters

random Random

Returns

Vector3

NextVector3(Random, Vector3, Vector3)

Gets random Vector3 within range.

public static Vector3 NextVector3(this Random random, Vector3 min, Vector3 max)

Parameters

random Random

Current Random.

min Vector3

Minimum.

max Vector3

Maximum.

Returns

Vector3

Random Vector3.

NextVector4(Random, Vector4, Vector4)

Gets random Vector4 within range.

public static Vector4 NextVector4(this Random random, Vector4 min, Vector4 max)

Parameters

random Random

Current Random.

min Vector4

Minimum.

max Vector4

Maximum.

Returns

Vector4

Random Vector4.