Skip to content

Commit 2ef3f32

Browse files
committed
BinaryStream: Use little endian for f64
To match all the other data types
1 parent 36a23bf commit 2ef3f32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webgpu/util/binary_stream.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ export default class BinaryStream {
117117

118118
/** writeF64() writes a float64 to the buffer at the next 64-bit aligned offset */
119119
writeF64(value: number) {
120-
this.view.setFloat64(this.alignedOffset(8), value);
120+
this.view.setFloat64(this.alignedOffset(8), value, /* littleEndian */ true);
121121
}
122122

123123
/** readF64() reads a float64 from the buffer at the next 64-bit aligned offset */
124124
readF64(): number {
125-
return this.view.getFloat64(this.alignedOffset(8));
125+
return this.view.getFloat64(this.alignedOffset(8), /* littleEndian */ true);
126126
}
127127

128128
/**

0 commit comments

Comments
 (0)