Class MathEx
Contains extended Math functions.
Inheritance
System.Object
MathEx
Namespace: ExifLibrary
Assembly: ExifLibrary.dll
Syntax
public static class MathEx
Methods
| Improve this Doc View SourceGCD(UInt32, UInt32)
Returns the greatest common divisor of two numbers.
Declaration
public static uint GCD(uint a, uint b)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | a | First number. |
System.UInt32 | b | Second number. |
Returns
Type | Description |
---|---|
System.UInt32 |
GCD(UInt64, UInt64)
Returns the greatest common divisor of two numbers.
Declaration
public static ulong GCD(ulong a, ulong b)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | a | First number. |
System.UInt64 | b | Second number. |
Returns
Type | Description |
---|---|
System.UInt64 |
Power(Int32, UInt32)
Raises a number to the given power.
Declaration
public static int Power(int x, uint y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | A number to be raised to a power. |
System.UInt32 | y | A number that specifies a power. |
Returns
Type | Description |
---|---|
System.Int32 |
Power2(UInt32)
Raises two to the given power.
Declaration
public static int Power2(uint y)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | y | A number that specifies a power. |
Returns
Type | Description |
---|---|
System.Int32 |