Class BinaryUtils
Utility methods to work with binary number representation.
Inheritance
System.Object
BinaryUtils
Assembly: Eco.Shared.dll
Syntax
public static class BinaryUtils : Object
Methods
CountOfSetBits(Int32)
Counts set bits in a number.
Declaration
public static int CountOfSetBits(this int n)
Parameters
Type |
Name |
Description |
System.Int32 |
n |
|
Returns
Type |
Description |
System.Int32 |
|
CountOfSetBits(Int64)
Declaration
public static int CountOfSetBits(this long n)
Parameters
Type |
Name |
Description |
System.Int64 |
n |
|
Returns
Type |
Description |
System.Int32 |
|
CountOfSetBits(UInt64)
Counts set bits in a number.
Declaration
public static int CountOfSetBits(this ulong n)
Parameters
Type |
Name |
Description |
System.UInt64 |
n |
|
Returns
Type |
Description |
System.Int32 |
|
ReverseEndian(UInt32)
Declaration
public static uint ReverseEndian(this uint x)
Parameters
Type |
Name |
Description |
System.UInt32 |
x |
|
Returns
Type |
Description |
System.UInt32 |
|