UnityEssentials
Small but useful tools and features for Unity
|
Extensions for float More...
Static Public Member Functions | |
static float | Loop (this float floatToBeLooped, float exclusiveMaximum, float inclusiveMinimum=0f, float variancePerStep=1f) |
Loops the float between a minimum and maximum. More... | |
static float | Map (this float value, float originalRangeMin, float originalRangeMax, float newRangeMin=0f, float newRangeMax=1f) |
Maps the value from one range to another range. More... | |
Extensions for float
Definition at line 6 of file FloatExtensions.cs.
|
static |
Loops the float between a minimum and maximum.
exclusiveMaximum | The exclusive maximum value than can be obtained. |
inclusiveMinimum | The minimum value that can be obtained. |
variancePerStep | The value added to the int every time that the method is called. |
Definition at line 15 of file FloatExtensions.cs.
|
static |
Maps the value from one range to another range.
originalRangeMin | The minimum value in the original range. |
originalRangeMax | The maximum value in the original range. |
newRangeMin | The minimum value in the new range. |
newRangeMax | The maximum value in the new range. |
Definition at line 31 of file FloatExtensions.cs.