Ejemplo n.º 1
0
        /// <summary>
        /// Compress an array of Vector3
        /// </summary>
        /// <param name="gameObject"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        internal static Vector3[] Compress(GameObject gameObject, Vector3[] value)
        {
            int places = RuleUtility.FindDecimalPlaces(gameObject);

            Vector3[] result = new Vector3[value.Length];

            for (int i = 0; i < value.Length && i < result.Length; i++)
            {
                result[i] = Compress(places, value[i]);
            }

            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Compress a Vector3
        /// </summary>
        /// <param name="gameObject"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        internal static Vector3 Compress(GameObject gameObject, Vector3 value)
        {
            int places = RuleUtility.FindDecimalPlaces(gameObject);

            return(Compress(places, value));
        }