Table of Contents

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 float
f2 float

Returns

bool

AtLeast(double, double)

public static double AtLeast(this double value, double min)

Parameters

value double
min double

Returns

double

AtLeast(int, int)

public static int AtLeast(this int value, int min)

Parameters

value int
min int

Returns

int

AtLeast(float, float)

public static float AtLeast(this float value, float min)

Parameters

value float
min float

Returns

float

AtLeast(half, half)

public static half AtLeast(this half value, half max)

Parameters

value half
max half

Returns

half

AtMost(double, double)

public static double AtMost(this double value, double min)

Parameters

value double
min double

Returns

double

AtMost(int, int)

public static int AtMost(this int value, int max)

Parameters

value int
max int

Returns

int

AtMost(float, float)

public static float AtMost(this float value, float max)

Parameters

value float
max float

Returns

float

AtMost(half, half)

public static half AtMost(this half value, half max)

Parameters

value half
max 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 int
whole int

Returns

float