-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathinlines.js
More file actions
32 lines (32 loc) · 816 Bytes
/
inlines.js
File metadata and controls
32 lines (32 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
exports.writeDoubleBE = function (value) {
const buffer = Buffer.alloc(8)
buffer.writeDoubleBE(value)
return buffer
}
exports.readDoubleBE = function (value) {
return value.readDoubleBE()
}
exports.writeFloatBE = function (value) {
const buffer = Buffer.alloc(4)
buffer.writeFloatBE(value)
return buffer
}
exports.readFloatBE = function (value) {
return value.readFloatBE()
}
exports.writeDoubleLE = function (value) {
const buffer = Buffer.alloc(8)
buffer.writeDoubleLE(value)
return buffer
}
exports.readDoubleLE = function (value) {
return value.readDoubleLE()
}
exports.writeFloatLE = function (value) {
const buffer = Buffer.alloc(4)
buffer.writeFloatLE(value)
return buffer
}
exports.readFloatLE = function (value) {
return value.readFloatLE()
}