Exemplo n.º 1
0
        public static QuantizedVector3 Quantize(Vector3 vector3, BoundedRange[] boundedRange)
        {
            QuantizedVector3 data = default(QuantizedVector3);

                        #if ENABLE_MONO || ENABLE_IL2CPP
            data.x = boundedRange[0].Quantize(vector3.x);
            data.y = boundedRange[1].Quantize(vector3.y);
            data.z = boundedRange[2].Quantize(vector3.z);
                        #else
            data.x = boundedRange[0].Quantize(vector3.X);
            data.y = boundedRange[1].Quantize(vector3.Y);
            data.z = boundedRange[2].Quantize(vector3.Z);
                        #endif

            return(data);
        }
Exemplo n.º 2
0
 public static Vector3 Dequantize(QuantizedVector3 data, BoundedRange[] boundedRange)
 {
     return(new Vector3(boundedRange[0].Dequantize(data.x), boundedRange[1].Dequantize(data.y), boundedRange[2].Dequantize(data.z)));
 }