File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -125,17 +125,18 @@ float speed = HalfPrecision.Decompress(compressedSpeed);
125125// Create a new BoundedRange array for Vector3 position, each entry has bounds and precision
126126BoundedRange [] worldBounds = new BoundedRange [3 ];
127127
128+ // Position data quantization
128129worldBounds [0 ] = new BoundedRange (- 50 f , 50 f , 0 . 05 f ); // X axis
129130worldBounds [1 ] = new BoundedRange (0 f , 25 f , 0 . 05 f ); // Y axis
130131worldBounds [2 ] = new BoundedRange (- 50 f , 50 f , 0 . 05 f ); // Z axis
131132
132133// Compress position data ready for compact bit-packing
133134CompressedVector3 compressedPosition = BoundedRange .Compress (position , worldBounds );
134135
135- // Read compressed data ready for reconstruction from bit-packing
136+ // Read compressed data
136137Console .WriteLine (" Compressed position - X: " + compressedPosition .x + " , Y:" + compressedPosition .y + " , Z:" + compressedPosition .z );
137138
138- // Decompress position data
139+ // Decompress position data ready for reconstruction from bit-packing
139140Vector3 decompressedPosition = BoundedRange .Decompress (compressedPosition , worldBounds );
140141```
141142
You can’t perform that action at this time.
0 commit comments