@@ -106,11 +106,7 @@ public static Vector128<TTo> As<TFrom, TTo>(this Vector128<TFrom> vector)
106
106
ThrowHelper . ThrowForUnsupportedIntrinsicsVector128BaseType < TFrom > ( ) ;
107
107
ThrowHelper . ThrowForUnsupportedIntrinsicsVector128BaseType < TTo > ( ) ;
108
108
109
- #if MONO
110
- return Unsafe . As < Vector128 < TFrom > , Vector128 < TTo > > ( ref vector ) ;
111
- #else
112
109
return Unsafe . BitCast < Vector128 < TFrom > , Vector128 < TTo > > ( vector ) ;
113
- #endif
114
110
}
115
111
116
112
/// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{Byte}" />.</summary>
@@ -174,27 +170,13 @@ public static Vector128<TTo> As<TFrom, TTo>(this Vector128<TFrom> vector)
174
170
/// <param name="value">The vector to reinterpret.</param>
175
171
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Plane" />.</returns>
176
172
[ Intrinsic ]
177
- internal static Plane AsPlane ( this Vector128 < float > value )
178
- {
179
- #if MONO
180
- return Unsafe . As < Vector128 < float > , Plane > ( ref value ) ;
181
- #else
182
- return Unsafe . BitCast < Vector128 < float > , Plane > ( value ) ;
183
- #endif
184
- }
173
+ internal static Plane AsPlane ( this Vector128 < float > value ) => Unsafe . BitCast < Vector128 < float > , Plane > ( value ) ;
185
174
186
175
/// <summary>Reinterprets a <see cref="Vector128{Single}" /> as a new <see cref="Quaternion" />.</summary>
187
176
/// <param name="value">The vector to reinterpret.</param>
188
177
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Quaternion" />.</returns>
189
178
[ Intrinsic ]
190
- internal static Quaternion AsQuaternion ( this Vector128 < float > value )
191
- {
192
- #if MONO
193
- return Unsafe . As < Vector128 < float > , Quaternion > ( ref value ) ;
194
- #else
195
- return Unsafe . BitCast < Vector128 < float > , Quaternion > ( value ) ;
196
- #endif
197
- }
179
+ internal static Quaternion AsQuaternion ( this Vector128 < float > value ) => Unsafe . BitCast < Vector128 < float > , Quaternion > ( value ) ;
198
180
199
181
/// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{SByte}" />.</summary>
200
182
/// <typeparam name="T">The type of the elements in the vector.</typeparam>
@@ -244,27 +226,13 @@ internal static Quaternion AsQuaternion(this Vector128<float> value)
244
226
/// <param name="value">The plane to reinterpret.</param>
245
227
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector128{Single}" />.</returns>
246
228
[ Intrinsic ]
247
- internal static Vector128 < float > AsVector128 ( this Plane value )
248
- {
249
- #if MONO
250
- return Unsafe . As < Plane , Vector128 < float > > ( ref value ) ;
251
- #else
252
- return Unsafe . BitCast < Plane , Vector128 < float > > ( value ) ;
253
- #endif
254
- }
229
+ internal static Vector128 < float > AsVector128 ( this Plane value ) => Unsafe . BitCast < Plane , Vector128 < float > > ( value ) ;
255
230
256
231
/// <summary>Reinterprets a <see cref="Quaternion" /> as a new <see cref="Vector128{Single}" />.</summary>
257
232
/// <param name="value">The quaternion to reinterpret.</param>
258
233
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector128{Single}" />.</returns>
259
234
[ Intrinsic ]
260
- internal static Vector128 < float > AsVector128 ( this Quaternion value )
261
- {
262
- #if MONO
263
- return Unsafe . As < Quaternion , Vector128 < float > > ( ref value ) ;
264
- #else
265
- return Unsafe . BitCast < Quaternion , Vector128 < float > > ( value ) ;
266
- #endif
267
- }
235
+ internal static Vector128 < float > AsVector128 ( this Quaternion value ) => Unsafe . BitCast < Quaternion , Vector128 < float > > ( value ) ;
268
236
269
237
/// <summary>Reinterprets a <see cref="Vector2" /> as a new <see cref="Vector128{Single}" /> with the new elements zeroed.</summary>
270
238
/// <param name="value">The vector to reinterpret.</param>
@@ -282,14 +250,7 @@ internal static Vector128<float> AsVector128(this Quaternion value)
282
250
/// <param name="value">The vector to reinterpret.</param>
283
251
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector128{Single}" />.</returns>
284
252
[ Intrinsic ]
285
- public static Vector128 < float > AsVector128 ( this Vector4 value )
286
- {
287
- #if MONO
288
- return Unsafe . As < Vector4 , Vector128 < float > > ( ref value ) ;
289
- #else
290
- return Unsafe . BitCast < Vector4 , Vector128 < float > > ( value ) ;
291
- #endif
292
- }
253
+ public static Vector128 < float > AsVector128 ( this Vector4 value ) => Unsafe . BitCast < Vector4 , Vector128 < float > > ( value ) ;
293
254
294
255
/// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector128{T}" />.</summary>
295
256
/// <typeparam name="T">The type of the elements in the vector.</typeparam>
@@ -361,14 +322,7 @@ public static Vector3 AsVector3(this Vector128<float> value)
361
322
/// <param name="value">The vector to reinterpret.</param>
362
323
/// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector4" />.</returns>
363
324
[ Intrinsic ]
364
- public static Vector4 AsVector4 ( this Vector128 < float > value )
365
- {
366
- #if MONO
367
- return Unsafe . As < Vector128 < float > , Vector4 > ( ref value ) ;
368
- #else
369
- return Unsafe . BitCast < Vector128 < float > , Vector4 > ( value ) ;
370
- #endif
371
- }
325
+ public static Vector4 AsVector4 ( this Vector128 < float > value ) => Unsafe . BitCast < Vector128 < float > , Vector4 > ( value ) ;
372
326
373
327
/// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector{T}" />.</summary>
374
328
/// <typeparam name="T">The type of the elements in the vector.</typeparam>
0 commit comments