12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System;
- using UnityEngine;
- namespace PublicTools.Unity
- {
- public struct XVector3
- {
-
-
-
- public float x;
-
-
-
- public float y;
-
-
-
- public float z;
- public XVector3(float x, float y, float z)
- {
- this.x = x;
- this.y = y;
- this.z = z;
- }
- public XVector3(Vector3 vector3)
- {
- this.x = vector3.x;
- this.y = vector3.y;
- this.z = vector3.z;
- }
- public XVector3(Vector3 vector3, int count)
- {
- this.x = (float)Math.Round(vector3.x, count);
- this.y = (float)Math.Round(vector3.y, count);
- this.z = (float)Math.Round(vector3.z, count);
- }
- public Vector3 Trans()
- {
- Vector3 vector = Vector3.zero;
- vector.x = this.x;
- vector.y = this.y;
- vector.z = this.z;
- return vector;
- }
-
-
-
-
- }
- }
|