Skip to content

Commit 759daf2

Browse files
committed
docs(xml): Added XML documentation to BinaryHelper class and methods
1 parent e041031 commit 759daf2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

MLAPI/NetworkingManagerComponents/Binary/BinaryHelpers.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
namespace MLAPI.Serialization
22
{
3+
/// <summary>
4+
/// Binary helper class
5+
/// </summary>
36
public static class BinaryHelpers
47
{
5-
// Swap endianness of a given integer
8+
/// <summary>
9+
/// Swaps the endianness of a given integer
10+
/// </summary>
11+
/// <returns>The integer with swapped endianness</returns>
12+
/// <param name="value">The integer to swap endianess</param>
613
public static uint SwapEndian(uint value) => (uint)(((value >> 24) & (255 << 0)) | ((value >> 8) & (255 << 8)) | ((value << 8) & (255 << 16)) | ((value << 24) & (255 << 24)));
14+
/// <summary>
15+
/// Swaps the endianness of a given integer
16+
/// </summary>
17+
/// <returns>The integer with swapped endianness</returns>
18+
/// <param name="value">The integer to swap endianess</param>
719
public static ulong SwapEndian(ulong value) =>
820
((value >> 56) & 0xFF) |
921
((value >> 40) & (0xFFUL << 8)) |

0 commit comments

Comments
 (0)