public static QuantizedVector2 Quantize(Vector2 vector2, BoundedRange[] boundedRange) { QuantizedVector2 data = default(QuantizedVector2); #if ENABLE_MONO || ENABLE_IL2CPP data.x = boundedRange[0].Quantize(vector2.x); data.y = boundedRange[1].Quantize(vector2.y); #else data.x = boundedRange[0].Quantize(vector2.X); data.y = boundedRange[1].Quantize(vector2.Y); #endif return(data); }
public static Vector2 Dequantize(QuantizedVector2 data, BoundedRange[] boundedRange) { return(new Vector2(boundedRange[0].Dequantize(data.x), boundedRange[1].Dequantize(data.y))); }