Class MBRandom
- Namespace
- TaleWorlds.Core
- Assembly
- TaleWorlds.Core.dll
public static class MBRandom
- Inheritance
-
MBRandom
- Inherited Members
Fields
MaxSeed
public const int MaxSeed = 2000
Field Value
Properties
NondeterministicRandomFloat
public static float NondeterministicRandomFloat { get; }
Property Value
NondeterministicRandomInt
public static int NondeterministicRandomInt { get; }
Property Value
RandomFloat
public static float RandomFloat { get; }
Property Value
RandomFloatNormal
public static float RandomFloatNormal { get; }
Property Value
Methods
ChooseWeighted<T>(IReadOnlyList<(T, float)>)
public static T ChooseWeighted<T>(IReadOnlyList<(T, float)> weightList)
Parameters
weightList
IReadOnlyList<(T, float)>
Returns
- T
Type Parameters
T
ChooseWeighted<T>(IReadOnlyList<(T, float)>, out int)
public static T ChooseWeighted<T>(IReadOnlyList<(T, float)> weightList, out int chosenIndex)
Parameters
weightList
IReadOnlyList<(T, float)>chosenIndex
int
Returns
- T
Type Parameters
T
RandomFloatRanged(float)
public static float RandomFloatRanged(float maxVal)
Parameters
maxVal
float
Returns
RandomFloatRanged(float, float)
public static float RandomFloatRanged(float minVal, float maxVal)
Parameters
Returns
RandomFloatWithSeed(uint, uint)
public static float RandomFloatWithSeed(uint seed, uint seed2)
Parameters
Returns
RandomInt()
public static int RandomInt()
Returns
RandomInt(int)
public static int RandomInt(int maxValue)
Parameters
maxValue
int
Returns
RandomInt(int, int)
public static int RandomInt(int minValue, int maxValue)
Parameters
Returns
RandomIntWithSeed(uint, uint)
public static int RandomIntWithSeed(uint seed, uint seed2)
Parameters
Returns
RoundRandomized(float)
public static int RoundRandomized(float f)
Parameters
f
float
Returns
SetSeed(uint, uint)
public static void SetSeed(uint seed, uint seed2)
Parameters
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).