TextStudioDeterministicHash
public static class TextStudioDeterministicHashStateless deterministic hashing for stable local variation without touching Unity random state.
Methods
Section titled “Methods”
Hash(int, int)
Section titled “Hash(int, int)”public static uint Hash(int identity, int salt)Returns a deterministic unsigned hash for one integer identity and salt.
Parameters
| Name | Type |
|---|---|
identity |
System.Int32 |
salt |
System.Int32 |
Returns
System.UInt32
Value01(int, int)
Section titled “Value01(int, int)”public static float Value01(int identity, int salt)Returns a deterministic normalized value in the inclusive range from zero to one.
Parameters
| Name | Type |
|---|---|
identity |
System.Int32 |
salt |
System.Int32 |
Returns
System.Single
SignedValue(int, int)
Section titled “SignedValue(int, int)”public static float SignedValue(int identity, int salt)Returns a deterministic normalized value in the inclusive range from minus one to one.
Parameters
| Name | Type |
|---|---|
identity |
System.Int32 |
salt |
System.Int32 |
Returns
System.Single