Class MathUtils
Provides math-related utility functions.
public static class MathUtils
- Inheritance
-
MathUtils
Methods
EqualsTolerance(double, double, double)
Compares two floating-point values for equality, allowing for a certain tolerance
.
public static bool EqualsTolerance(this double a, double b, double tolerance = 1E-05)
Parameters
Returns
EqualsTolerance(float, float, float)
Compares two floating-point values for equality, allowing for a certain tolerance
.
public static bool EqualsTolerance(this float a, float b, float tolerance = 1E-05)
Parameters
Returns
Modulo(int, int)
Calculates the mathematical modulo of a value.
public static int Modulo(this int value, int modulo)
Parameters
Returns
Modulo(long, long)
Calculates the mathematical modulo of a value.
public static long Modulo(this long value, long modulo)
Parameters
Returns
MultiplyAndRound(Size, SizeF)
public static Size MultiplyAndRound(this Size size, SizeF factor)
Parameters
Returns
XOr(byte[], byte[])
Combines two byte arrays via Exclusive Or.
public static byte[] XOr(byte[] array1, byte[] array2)
Parameters
Returns
- byte[]