Class ExtensionMethodsMath
Provides a set of extension methods to do some simple math.
public static class ExtensionMethodsMath
- Inheritance
-
ExtensionMethodsMath
- Inherited Members
Methods (16)
Linear(double, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double Linear(this double x, double x1, double y1, double x2, double y2)
Parameters
xdoubleThis value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
Linear(short, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double Linear(this short x, double x1, double y1, double x2, double y2)
Parameters
xshortThis value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
Linear(int, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double Linear(this int x, double x1, double y1, double x2, double y2)
Parameters
xintThis value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
Linear(long, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double Linear(this long x, double x1, double y1, double x2, double y2)
Parameters
xlongThis value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
Linear(double?, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double? Linear(this double? x, double x1, double y1, double x2, double y2)
Parameters
xdouble?This value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
If x is null returns null.
Linear(short?, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double? Linear(this short? x, double x1, double y1, double x2, double y2)
Parameters
xshort?This value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
If x is null returns null.
Linear(int?, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double? Linear(this int? x, double x1, double y1, double x2, double y2)
Parameters
xint?This value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
If x is null returns null.
Linear(long?, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double? Linear(this long? x, double x1, double y1, double x2, double y2)
Parameters
xlong?This value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
If x is null returns null.
Linear(float?, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double? Linear(this float? x, double x1, double y1, double x2, double y2)
Parameters
xfloat?This value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
If x is null returns null.
Linear(ushort?, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double? Linear(this ushort? x, double x1, double y1, double x2, double y2)
Parameters
xushort?This value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
If x is null returns null.
Linear(uint?, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double? Linear(this uint? x, double x1, double y1, double x2, double y2)
Parameters
xuint?This value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
If x is null returns null.
Linear(ulong?, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double? Linear(this ulong? x, double x1, double y1, double x2, double y2)
Parameters
xulong?This value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
If x is null returns null.
Linear(float, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double Linear(this float x, double x1, double y1, double x2, double y2)
Parameters
xfloatThis value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
Linear(ushort, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double Linear(this ushort x, double x1, double y1, double x2, double y2)
Parameters
xushortThis value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
Linear(uint, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double Linear(this uint x, double x1, double y1, double x2, double y2)
Parameters
xuintThis value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.
Linear(ulong, double, double, double, double)
Returns linear value for x between the points (x1, y1) and (x2, y2).
public static double Linear(this ulong x, double x1, double y1, double x2, double y2)
Parameters
xulongThis value.
x1doublex coordinate 1
y1doubley coordinate 1
x2doublex coordinate 2
y2doubley coordinate 2
Returns
Remarks
If x is lower than x1 returns y1.
If x is higher than x2 returns y2.