예제 #1
0
        /// <summary>
        /// Converts a Vector3 to a Vector3i.
        /// </summary>
        /// <returns>
        /// The vector3i.
        /// </returns>
        /// <param name='inputVector'>
        /// Input Vector3.
        /// </param>
        public static Vector3i Vector3ToVector3i(UnityEngine.Vector3 inputVector)
        {
            int iX, iY, iZ;

            iX = (int)Mathf.Round(inputVector.x);
            iY = (int)Mathf.Round(inputVector.y);
            iZ = (int)Mathf.Round(inputVector.z);
            return(new Vector3i(iX, iY, iZ));
        }