A game about forced loneliness, made by TACStudios
1# Random Range Node 2 3## Description 4 5Returns a pseudo-random number value based on input **Seed** that is between the minimum and maximum values defined by inputs **Min** and **Max** respectively. 6 7Whilst the same value in input **Seed** will always result in the same output value, the output value itself will appear random. Input **Seed** is a **Vector 2** value for the convenience of generating a random number based on a UV input, however for most cases a **Float** input will suffice. 8 9## Ports 10 11| Name | Direction | Type | Description | 12|:------------ |:-------------|:-----|:---| 13| Seed | Input | Vector 2 | Seed value used for generation | 14| Min | Input | Float | Minimum value | 15| Max | Input | Float | Maximum value | 16| Out | Output | Float | Output value | 17 18## Generated Code Example 19 20The following example code represents one possible outcome of this node. 21 22``` 23void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) 24{ 25 float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233)))*43758.5453); 26 Out = lerp(Min, Max, randomno); 27} 28```