idTech4.Extensions.Get C# (CSharp) Метод

Get() публичный статический Метод

public static Get ( this v, int index ) : float
v this
index int
Результат float
		public static float Get(this Vector3 v, int index)
		{
			if(index == 0)
			{
				return v.X;
			}
			else if(index == 1)
			{
				return v.Y;
			}
			else if(index == 2)
			{
				return v.Z;
			}
			else
			{
				throw new ArgumentOutOfRangeException("index");
			}
		}