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

◆ GetOneValue()

static T System.Numerics.Vector< T >.GetOneValue ( )
inlinestaticprivate

Definition at line 1982 of file Vector.cs.

1983 {
1984 if (typeof(T) == typeof(byte))
1985 {
1986 return (T)(object)(byte)1;
1987 }
1988 if (typeof(T) == typeof(sbyte))
1989 {
1990 return (T)(object)(sbyte)1;
1991 }
1992 if (typeof(T) == typeof(ushort))
1993 {
1994 return (T)(object)(ushort)1;
1995 }
1996 if (typeof(T) == typeof(short))
1997 {
1998 return (T)(object)(short)1;
1999 }
2000 if (typeof(T) == typeof(uint))
2001 {
2002 return (T)(object)1u;
2003 }
2004 if (typeof(T) == typeof(int))
2005 {
2006 return (T)(object)1;
2007 }
2008 if (typeof(T) == typeof(ulong))
2009 {
2010 return (T)(object)1uL;
2011 }
2012 if (typeof(T) == typeof(long))
2013 {
2014 return (T)(object)1L;
2015 }
2016 if (typeof(T) == typeof(float))
2017 {
2018 return (T)(object)1f;
2019 }
2020 if (typeof(T) == typeof(double))
2021 {
2022 return (T)(object)1.0;
2023 }
2024 if (typeof(T) == typeof(UIntPtr))
2025 {
2026 return (T)(object)(nuint)1u;
2027 }
2028 if (typeof(T) == typeof(IntPtr))
2029 {
2030 return (T)(object)(nint)1;
2031 }
2032 throw new NotSupportedException(SR.Arg_TypeNotSupported);
2033 }

References System.SR.Arg_TypeNotSupported, and System.L.