Class
- Namespace
- CoreFramework
Provides extension methods for the int and float types.
public static class NumberExtensions
- Inheritance
-
object
Methods
Approx(float, float)
public static bool Approx(this float f1, float f2)
Parameters
f1
floatf2
float
Returns
- bool
AtLeast(double, double)
public static double AtLeast(this double value, double min)
Parameters
value
doublemin
double
Returns
- double
AtLeast(int, int)
public static int AtLeast(this int value, int min)
Parameters
value
intmin
int
Returns
- int
AtLeast(float, float)
public static float AtLeast(this float value, float min)
Parameters
value
floatmin
float
Returns
- float
AtLeast(half, half)
public static half AtLeast(this half value, half max)
Parameters
value
halfmax
half
Returns
- half
AtMost(double, double)
public static double AtMost(this double value, double min)
Parameters
value
doublemin
double
Returns
- double
AtMost(int, int)
public static int AtMost(this int value, int max)
Parameters
value
intmax
int
Returns
- int
AtMost(float, float)
public static float AtMost(this float value, float max)
Parameters
value
floatmax
float
Returns
- float
AtMost(half, half)
public static half AtMost(this half value, half max)
Parameters
value
halfmax
half
Returns
- half
IsEven(int)
public static bool IsEven(this int i)
Parameters
i
int
Returns
- bool
IsOdd(int)
public static bool IsOdd(this int i)
Parameters
i
int
Returns
- bool
PercentageOf(int, int)
public static float PercentageOf(this int part, int whole)
Parameters
part
intwhole
int
Returns
- float