Class NumericExtensions
- Namespace
- Lime
- Assembly
- Lime.dll
public static class NumericExtensions
- Inheritance
-
NumericExtensions
- Inherited Members
-
Methods
Abs(int)
public static int Abs(this int x)
Parameters
x
int
Returns
- int
Abs(long)
public static long Abs(this long x)
Parameters
x
long
Returns
- long
Abs(float)
public static float Abs(this float x)
Parameters
x
float
Returns
- float
Ceiling(float)
public static int Ceiling(this float x)
Parameters
x
float
Returns
- int
Clamp(double, double, double)
public static double Clamp(this double value, double min, double max)
Parameters
value
double
min
double
max
double
Returns
- double
Clamp(int, int, int)
public static int Clamp(this int value, int min, int max)
Parameters
value
int
min
int
max
int
Returns
- int
Clamp(float, float, float)
public static float Clamp(this float value, float min, float max)
Parameters
value
float
min
float
max
float
Returns
- float
Floor(float)
public static int Floor(this float x)
Parameters
x
float
Returns
- int
InRange(float, float, float)
public static bool InRange(this float x, float upper, float lower)
Parameters
x
float
upper
float
lower
float
Returns
- bool
Lerp(float, float, float)
public static float Lerp(this float amount, float value1, float value2)
Parameters
amount
float
value1
float
value2
float
Returns
- float
Localize(int, string)
public static string Localize(this int value, string format = "N0")
Parameters
value
int
format
string
Returns
- string
Localize(float, string)
public static string Localize(this float value, string format = "")
Parameters
value
float
format
string
Returns
- string
Max(int, int)
public static int Max(this int a, int b)
Parameters
a
int
b
int
Returns
- int
Max(float, float)
public static float Max(this float a, float b)
Parameters
a
float
b
float
Returns
- float
Min(int, int)
public static int Min(this int a, int b)
Parameters
a
int
b
int
Returns
- int
Min(float, float)
public static float Min(this float a, float b)
Parameters
a
float
b
float
Returns
- float
Pow(float, float)
public static float Pow(this float x, float y)
Parameters
x
float
y
float
Returns
- float
Round(double)
public static int Round(this double x)
Parameters
x
double
Returns
- int
Round(float)
public static int Round(this float x)
Parameters
x
float
Returns
- int
Sign(int)
public static int Sign(this int x)
Parameters
x
int
Returns
- int
Sign(long)
public static int Sign(this long x)
Parameters
x
long
Returns
- int
Sign(float)
public static int Sign(this float x)
Parameters
x
float
Returns
- int
Sqr(float)
public static float Sqr(this float x)
Parameters
x
float
Returns
- float
Sqrt(float)
public static float Sqrt(this float x)
Parameters
x
float
Returns
- float
Truncate(float)
public static int Truncate(this float x)
Parameters
x
float
Returns
- int
Wrap(int, int, int)
public static int Wrap(this int x, int lowerBound, int upperBound)
Parameters
x
int
lowerBound
int
upperBound
int
Returns
- int
Wrap360(float)
public static float Wrap360(this float x)
Parameters
x
float
Returns
- float