Skip to content

Commit ce4bcfd

Browse files
authored
Update README.md
1 parent 657b2bc commit ce4bcfd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
126126
BoundedRange[] worldBounds = new BoundedRange[3];
127127

128+
// Position data quantization
128129
worldBounds[0] = new BoundedRange(-50f, 50f, 0.05f); // X axis
129130
worldBounds[1] = new BoundedRange(0f, 25f, 0.05f); // Y axis
130131
worldBounds[2] = new BoundedRange(-50f, 50f, 0.05f); // Z axis
131132
132133
// Compress position data ready for compact bit-packing
133134
CompressedVector3 compressedPosition = BoundedRange.Compress(position, worldBounds);
134135

135-
// Read compressed data ready for reconstruction from bit-packing
136+
// Read compressed data
136137
Console.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
139140
Vector3 decompressedPosition = BoundedRange.Decompress(compressedPosition, worldBounds);
140141
```
141142

0 commit comments

Comments
 (0)