Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Abs()

static Vector< T > System.Numerics.Vector< T >.Abs ( Vector< T > value)
inlinestaticpackage

Definition at line 1386 of file Vector.cs.

1387 {
1388 if (typeof(T) == typeof(byte))
1389 {
1390 return value;
1391 }
1392 if (typeof(T) == typeof(ushort))
1393 {
1394 return value;
1395 }
1396 if (typeof(T) == typeof(uint))
1397 {
1398 return value;
1399 }
1400 if (typeof(T) == typeof(ulong))
1401 {
1402 return value;
1403 }
1404 if (typeof(T) == typeof(UIntPtr))
1405 {
1406 return value;
1407 }
1408 Vector<T> result = default(Vector<T>);
1409 for (nint num = 0; num < Count; num++)
1410 {
1411 result.SetElement(num, ScalarAbs(value.GetElement(num)));
1412 }
1413 return result;
1414 }
static T ScalarAbs(T value)
Definition Vector.cs:2090

References System.Numerics.Vector< T >.Count, System.Numerics.Vector< T >.ScalarAbs(), and System.value.

Referenced by System.Numerics.Vector< T >.Abs< T >().