Class DewMath
Inheritance
object
DewMath
Assembly: Dew.Core.dll
Syntax
public static class DewMath
Methods
Lerp(Vector2, float)
Declaration
public static float Lerp(this Vector2 vec, float t)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector2 |
vec |
|
| float |
t |
|
Returns
MultiplyPercentageBonuses(float, float)
Multiply percentage bonuses.
This(50, 50) = 125. (1.5 * 1.5 = 2.25)
This(100, 100) = 300. (2 * 2 = 4)
This(-50, 50) = -25. (0.5 * 1.5 = 0.75)
Declaration
public static float MultiplyPercentageBonuses(float a, float b)
Parameters
| Type |
Name |
Description |
| float |
a |
|
| float |
b |
|
Returns
RandomRange(Vector2)
Declaration
public static float RandomRange(this Vector2 vec)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector2 |
vec |
|
Returns
RandomRoundToInt(float, DewRandom)
Declaration
public static int RandomRoundToInt(float value, DewRandom random = null)
Parameters
| Type |
Name |
Description |
| float |
value |
|
| DewRandom |
random |
|
Returns