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

◆ ScalarAdd()

static T System.Numerics.Vector< T >.ScalarAdd ( T left,
T right )
inlinestaticprivate

Definition at line 1766 of file Vector.cs.

1767 {
1768 if (typeof(T) == typeof(byte))
1769 {
1770 return (T)(object)(byte)((byte)(object)left + (byte)(object)right);
1771 }
1772 if (typeof(T) == typeof(sbyte))
1773 {
1774 return (T)(object)(sbyte)((sbyte)(object)left + (sbyte)(object)right);
1775 }
1776 if (typeof(T) == typeof(ushort))
1777 {
1778 return (T)(object)(ushort)((ushort)(object)left + (ushort)(object)right);
1779 }
1780 if (typeof(T) == typeof(short))
1781 {
1782 return (T)(object)(short)((short)(object)left + (short)(object)right);
1783 }
1784 if (typeof(T) == typeof(uint))
1785 {
1786 return (T)(object)((uint)(object)left + (uint)(object)right);
1787 }
1788 if (typeof(T) == typeof(int))
1789 {
1790 return (T)(object)((int)(object)left + (int)(object)right);
1791 }
1792 if (typeof(T) == typeof(ulong))
1793 {
1794 return (T)(object)((ulong)(object)left + (ulong)(object)right);
1795 }
1796 if (typeof(T) == typeof(long))
1797 {
1798 return (T)(object)((long)(object)left + (long)(object)right);
1799 }
1800 if (typeof(T) == typeof(float))
1801 {
1802 return (T)(object)((float)(object)left + (float)(object)right);
1803 }
1804 if (typeof(T) == typeof(double))
1805 {
1806 return (T)(object)((double)(object)left + (double)(object)right);
1807 }
1808 if (typeof(T) == typeof(UIntPtr))
1809 {
1810 return (T)(object)(nuint)((nint)(nuint)(UIntPtr)(object)left + (nint)(nuint)(UIntPtr)(object)right);
1811 }
1812 if (typeof(T) == typeof(IntPtr))
1813 {
1814 return (T)(object)((nint)(IntPtr)(object)left + (nint)(IntPtr)(object)right);
1815 }
1816 throw new NotSupportedException(SR.Arg_TypeNotSupported);
1817 }

References System.SR.Arg_TypeNotSupported.

Referenced by System.Numerics.Vector< T >.Dot(), System.Numerics.Vector< T >.operator+(), and System.Numerics.Vector< T >.Sum().