Class Utils
Assembly: LiteEntitySystem.dll
Syntax
public static class Utils
Fields
Encoding
Declaration
public static readonly ThreadLocal<UTF8Encoding> Encoding
Field Value
Methods
AddToArrayDynamic<T>(ref T[], ref int, T)
Declaration
public static void AddToArrayDynamic<T>(ref T[] arr, ref int count, T value)
Parameters
Type |
Name |
Description |
T[] |
arr |
|
int |
count |
|
T |
value |
|
Type Parameters
FastEquals<T>(ref T, byte*)
Declaration
public static bool FastEquals<T>(ref T a, byte* x2) where T : unmanaged
Parameters
Type |
Name |
Description |
T |
a |
|
byte* |
x2 |
|
Returns
Type Parameters
FastEquals<T>(ref T, ref T)
Declaration
public static bool FastEquals<T>(ref T a, ref T b) where T : unmanaged
Parameters
Type |
Name |
Description |
T |
a |
|
T |
b |
|
Returns
Type Parameters
GetEnumValueInt<T>(T)
Declaration
public static int GetEnumValueInt<T>(this T e) where T : unmanaged, Enum
Parameters
Type |
Name |
Description |
T |
e |
|
Returns
Type Parameters
GetEnumValue<T>(SyncVar<T>)
Declaration
public static long GetEnumValue<T>(this SyncVar<T> e) where T : unmanaged, Enum
Parameters
Returns
Type Parameters
GetEnumValue<T>(T)
Declaration
public static long GetEnumValue<T>(this T e) where T : unmanaged, Enum
Parameters
Type |
Name |
Description |
T |
e |
|
Returns
Type Parameters
HasFlagFast<T>(SyncVar<T>, T)
Declaration
public static bool HasFlagFast<T>(this SyncVar<T> e, T flag) where T : unmanaged, Enum
Parameters
Type |
Name |
Description |
SyncVar<T> |
e |
|
T |
flag |
|
Returns
Type Parameters
HasFlagFast<T>(T, T)
Declaration
public static bool HasFlagFast<T>(this T e, T flag) where T : unmanaged, Enum
Parameters
Type |
Name |
Description |
T |
e |
|
T |
flag |
|
Returns
Type Parameters
InvLerp(float, float, float)
Declaration
public static float InvLerp(float a, float b, float v)
Parameters
Returns
IsBitSet(byte*, int)
Declaration
public static bool IsBitSet(byte* byteArray, int bitNumber)
Parameters
Type |
Name |
Description |
byte* |
byteArray |
|
int |
bitNumber |
|
Returns
IsBitSet(byte[], int, int)
Declaration
public static bool IsBitSet(byte[] byteArray, int offset, int bitNumber)
Parameters
Type |
Name |
Description |
byte[] |
byteArray |
|
int |
offset |
|
int |
bitNumber |
|
Returns
Lerp(double, double, float)
Declaration
public static double Lerp(double a, double b, float t)
Parameters
Returns
Lerp(int, int, float)
Declaration
public static int Lerp(int a, int b, float t)
Parameters
Returns
Lerp(long, long, float)
Declaration
public static long Lerp(long a, long b, float t)
Parameters
Returns
Lerp(float, float, float)
Declaration
public static float Lerp(float a, float b, float t)
Parameters
Returns
LerpSequence(ushort, ushort, float)
Declaration
public static ushort LerpSequence(ushort seq1, ushort seq2, float t)
Parameters
Returns
MoveTowards(float, float, float)
Declaration
public static float MoveTowards(float current, float target, float maxDelta)
Parameters
Returns
ReadStruct<T>(ReadOnlySpan<byte>)
Declaration
public static T ReadStruct<T>(this ReadOnlySpan<byte> data) where T : unmanaged
Parameters
Returns
Type Parameters
ReadStruct<T>(ReadOnlySpan<byte>, out T)
Declaration
public static int ReadStruct<T>(this ReadOnlySpan<byte> data, out T value) where T : unmanaged
Parameters
Returns
Type Parameters
ResizeIfFull<T>(ref T[], int)
Declaration
public static void ResizeIfFull<T>(ref T[] arr, int count)
Parameters
Type |
Name |
Description |
T[] |
arr |
|
int |
count |
|
Type Parameters
ResizeOrCreate<T>(ref T[], int)
Declaration
public static void ResizeOrCreate<T>(ref T[] arr, int count)
Parameters
Type |
Name |
Description |
T[] |
arr |
|
int |
count |
|
Type Parameters
SequenceDiff(ushort, ushort)
Declaration
public static int SequenceDiff(ushort newer, ushort older)
Parameters
Returns
SizeOfStruct<T>()
Declaration
public static int SizeOfStruct<T>() where T : unmanaged
Returns
Type Parameters
WriteStruct<T>(Span<byte>, T)
Declaration
public static int WriteStruct<T>(this Span<byte> data, T value) where T : unmanaged
Parameters
Type |
Name |
Description |
Span<byte> |
data |
|
T |
value |
|
Returns
Type Parameters