Esempio n. 1
0
        /// <summary>
        /// 变成Vector3
        /// </summary>
        /// <param name="v"></param>
        /// <param name="format"></param>
        /// <returns></returns>
        public static Vector3 ToVector3(Vector2 v, string format = StringConst.String_x_y_0)
        {
            string[] formats = format.Split(CharConst.Char_Comma);
            float    x       = Vector3Util.GetFormat(v, formats[0]);
            float    y       = Vector3Util.GetFormat(v, formats[1]);
            float    z       = Vector3Util.GetFormat(v, formats[2]);

            return(new Vector3(x, y, z));
        }
Esempio n. 2
0
 public static float GetFormat(Vector3 self, string format)
 {
     return(Vector3Util.GetFormat(self, format));
 }