Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Vector128DebugView.cs
Go to the documentation of this file.
2
4
5internal readonly struct Vector128DebugView<T> where T : struct
6{
7 private readonly Vector128<T> _value;
8
9 public byte[] ByteView
10 {
11 get
12 {
13 byte[] array = new byte[16];
14 Unsafe.WriteUnaligned(ref array[0], _value);
15 return array;
16 }
17 }
18
19 public double[] DoubleView
20 {
21 get
22 {
23 double[] array = new double[2];
24 Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref array[0]), _value);
25 return array;
26 }
27 }
28
29 public short[] Int16View
30 {
31 get
32 {
33 short[] array = new short[8];
34 Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref array[0]), _value);
35 return array;
36 }
37 }
38
39 public int[] Int32View
40 {
41 get
42 {
43 int[] array = new int[4];
44 Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref array[0]), _value);
45 return array;
46 }
47 }
48
49 public long[] Int64View
50 {
51 get
52 {
53 long[] array = new long[2];
54 Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref array[0]), _value);
55 return array;
56 }
57 }
58
59 public sbyte[] SByteView
60 {
61 get
62 {
63 sbyte[] array = new sbyte[16];
64 Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref array[0]), _value);
65 return array;
66 }
67 }
68
69 public float[] SingleView
70 {
71 get
72 {
73 float[] array = new float[4];
74 Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref array[0]), _value);
75 return array;
76 }
77 }
78
79 public ushort[] UInt16View
80 {
81 get
82 {
83 ushort[] array = new ushort[8];
84 Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref array[0]), _value);
85 return array;
86 }
87 }
88
89 public uint[] UInt32View
90 {
91 get
92 {
93 uint[] array = new uint[4];
94 Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref array[0]), _value);
95 return array;
96 }
97 }
98
99 public ulong[] UInt64View
100 {
101 get
102 {
103 ulong[] array = new ulong[2];
104 Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref array[0]), _value);
105 return array;
106 }
107 }
108
113}