Skip to content

Commit fb70806

Browse files
committed
refactor: Made Arithmetic constants internal
BREAKING CHANGE: Removes Arithmetic constants from the public API
1 parent 8a75676 commit fb70806

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

MLAPI/NetworkingManagerComponents/Binary/Arithmetic.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
public static class Arithmetic
44
{
55
// Sign bits for different data types
6-
public const long SIGN_BIT_64 = -9223372036854775808;
7-
public const int SIGN_BIT_32 = -2147483648;
8-
public const short SIGN_BIT_16 = -32768;
9-
public const sbyte SIGN_BIT_8 = -128;
6+
internal const long SIGN_BIT_64 = -9223372036854775808;
7+
internal const int SIGN_BIT_32 = -2147483648;
8+
internal const short SIGN_BIT_16 = -32768;
9+
internal const sbyte SIGN_BIT_8 = -128;
1010

1111
// Ceiling function that doesn't deal with floating point values
1212
// these only work correctly with possitive numbers
13-
public static ulong CeilingExact(ulong u1, ulong u2) => (u1 + u2 - 1) / u2;
14-
public static long CeilingExact(long u1, long u2) => (u1 + u2 - 1) / u2;
15-
public static uint CeilingExact(uint u1, uint u2) => (u1 + u2 - 1) / u2;
16-
public static int CeilingExact(int u1, int u2) => (u1 + u2 - 1) / u2;
17-
public static ushort CeilingExact(ushort u1, ushort u2) => (ushort)((u1 + u2 - 1) / u2);
18-
public static short CeilingExact(short u1, short u2) => (short)((u1 + u2 - 1) / u2);
19-
public static byte CeilingExact(byte u1, byte u2) => (byte)((u1 + u2 - 1) / u2);
20-
public static sbyte CeilingExact(sbyte u1, sbyte u2) => (sbyte)((u1 + u2 - 1) / u2);
13+
internal static ulong CeilingExact(ulong u1, ulong u2) => (u1 + u2 - 1) / u2;
14+
internal static long CeilingExact(long u1, long u2) => (u1 + u2 - 1) / u2;
15+
internal static uint CeilingExact(uint u1, uint u2) => (u1 + u2 - 1) / u2;
16+
internal static int CeilingExact(int u1, int u2) => (u1 + u2 - 1) / u2;
17+
internal static ushort CeilingExact(ushort u1, ushort u2) => (ushort)((u1 + u2 - 1) / u2);
18+
internal static short CeilingExact(short u1, short u2) => (short)((u1 + u2 - 1) / u2);
19+
internal static byte CeilingExact(byte u1, byte u2) => (byte)((u1 + u2 - 1) / u2);
20+
internal static sbyte CeilingExact(sbyte u1, sbyte u2) => (sbyte)((u1 + u2 - 1) / u2);
2121

2222
/// <summary>
2323
/// ZigZag encodes a signed integer and maps it to a unsigned integer

0 commit comments

Comments
 (0)