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
Returns
NextColor(Random, float, float)
Gets random opaque Color.
public static Color NextColor(this Random random, float minBrightness, float maxBrightness)
Parameters
randomRandomCurrent Random.
minBrightnessfloatMinimum brightness.
maxBrightnessfloatMaximum brightness
Returns
NextColor(Random, float, float, float)
Gets random Color.
public static Color NextColor(this Random random, float minBrightness, float maxBrightness, float alpha)
Parameters
randomRandomCurrent Random.
minBrightnessfloatMinimum brightness.
maxBrightnessfloatMaximum brightness
alphafloatAlpha value.
Returns
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
randomRandomCurrent Random.
minBrightnessfloatMinimum brightness.
maxBrightnessfloatMaximum brightness
minAlphafloatMinimum alpha.
maxAlphafloatMaximum alpha.
Returns
NextDouble(Random, double, double)
Gets random double number within range.
public static double NextDouble(this Random random, double min, double max)
Parameters
Returns
- double
Random
doublenumber.
NextFloat(Random, float, float)
Gets random float number within range.
public static float NextFloat(this Random random, float min, float max)
Parameters
Returns
- float
Random
floatnumber.
NextLong(Random)
Gets random long number.
public static long NextLong(this Random random)
Parameters
Returns
- long
Random
longnumber.
NextLong(Random, long, long)
Gets random long number within range.
public static long NextLong(this Random random, long min, long max)
Parameters
Returns
- long
Random
longnumber.
NextTime(Random, TimeSpan, TimeSpan)
Gets random TimeSpan.
public static TimeSpan NextTime(this Random random, TimeSpan min, TimeSpan max)
Parameters
Returns
NextVector2(Random, Vector2, Vector2)
Gets random Vector2 within range.
public static Vector2 NextVector2(this Random random, Vector2 min, Vector2 max)
Parameters
Returns
NextVector3(Random)
public static Vector3 NextVector3(this Random random)
Parameters
randomRandom
Returns
NextVector3(Random, Vector3, Vector3)
Gets random Vector3 within range.
public static Vector3 NextVector3(this Random random, Vector3 min, Vector3 max)
Parameters
Returns
NextVector4(Random, Vector4, Vector4)
Gets random Vector4 within range.
public static Vector4 NextVector4(this Random random, Vector4 min, Vector4 max)