|
JUtils
A unity utilities library
|
A struct with a custom editor which can be used to get a minimum and a maximum value, handy for random values & clamping More...
Public Member Functions | |
| MinMax (float min, float max) | |
| Create a new MinMax instance More... | |
| float | Random () |
| Get a random value from min to max using UnityEngine.Random More... | |
| float | Random (Random random) |
| Get a random value from min to max using System.Random More... | |
| bool | Contains (float value) |
| Check if the value is contained between min and max More... | |
| float | Clamp (float value) |
| Clamps the value to be between A and B More... | |
| float | Lerp (float time) |
| Lerp from min to max More... | |
| float | InverseLerp (float value) |
| inverse lerp from min to max More... | |
Properties | |
| float | min [get] |
| Get the min value More... | |
| float | max [get] |
| Get the max value More... | |
| float | range [get] |
| Returns _max - _min More... | |
A struct with a custom editor which can be used to get a minimum and a maximum value, handy for random values & clamping
|
inline |
Create a new MinMax instance
| min | |
| max |
References JUtils.MinMax.max, and JUtils.MinMax.min.
|
inline |
Clamps the value to be between A and B
| value |
References JUtils.MinMax.max, and JUtils.MinMax.min.
|
inline |
Check if the value is contained between min and max
References JUtils.MinMax.max, and JUtils.MinMax.min.
|
inline |
inverse lerp from min to max
References JUtils.MinMax.max, and JUtils.MinMax.min.
|
inline |
Lerp from min to max
References JUtils.MinMax.max, and JUtils.MinMax.min.
|
inline |
Get a random value from min to max using UnityEngine.Random
|
inline |
Get a random value from min to max using System.Random
|
get |
Get the max value
|
get |
Get the min value
|
get |
Returns _max - _min