Unity Vector3

版权声明:转载 请说明 https://blog.csdn.net/qq2512667/article/details/82317182

Unity Vector3 

      
  public struct Vector3
        {
            public float x;
            public float y;
            public float z;
            public float Distance()
            {
                float distance = (float)Math.Sqrt(x * x + y * y + z * z);
                return distance;
            }
            public Vector3(float _x, float _y, float _z)
            {
                this.x = _x;
                this.y = _y;
                this.z = _z;
            }
            public Vector3(float one)
            {
                x = one;
                y = one;
                z = one;
            }
         }

猜你喜欢

转载自blog.csdn.net/qq2512667/article/details/82317182