Skip to content

Class: DewMath ​

  • Namespace: Global
  • Assembly: Dew.Core.dll
csharp
public static class DewMath

Methods ​

Lerp(Vector2, float) ​

csharp
public static float Lerp(this Vector2 vec, float t)

Parameters:

NameTypeDescription
vecUnityEngine.Vector2
tfloat

Returns: float

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)

csharp
public static float MultiplyPercentageBonuses(float a, float b)

Parameters:

NameTypeDescription
afloat
bfloat

Returns: float

RandomRange(Vector2) ​

csharp
public static float RandomRange(this Vector2 vec)

Parameters:

NameTypeDescription
vecUnityEngine.Vector2

Returns: float

RandomRoundToInt(float, DewRandom) ​

csharp
public static int RandomRoundToInt(float value, DewRandom random = null)

Parameters:

NameTypeDescription
valuefloat
randomDewRandom

Returns: int

Maintained by the Shape of Dreams Modding Community