public static ulong VectorExtractIntZx(AVec Vector, int Index, int Size) { switch (Size) { case 0: return(Vector.ExtractByte(Index)); case 1: return(Vector.ExtractUInt16(Index)); case 2: return(Vector.ExtractUInt32(Index)); case 3: return(Vector.ExtractUInt64(Index)); } throw new ArgumentOutOfRangeException(nameof(Size)); }
public static long ExtractSVec(AVec Vector, int Index, int Size) { switch (Size) { case 0: return((sbyte)Vector.ExtractByte(Index)); case 1: return((short)Vector.ExtractUInt16(Index)); case 2: return((int)Vector.ExtractUInt32(Index)); case 3: return((long)Vector.ExtractUInt64(Index)); } throw new ArgumentOutOfRangeException(nameof(Size)); }