| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 395ba7b commit c7268c4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2145,15 +2145,15 @@ endian). `value` *should* be a valid 64-bit double. Behavior is undefined when | |||
| 2145 | 2145 | ```js | |
| 2146 | 2146 | const buf = Buffer.allocUnsafe(8); | |
| 2147 | 2147 | ||
| 2148 | - buf.writeDoubleBE(0xdeadbeefcafebabe, 0); | ||
| 2148 | + buf.writeDoubleBE(123.456, 0); | ||
| 2149 | 2149 | ||
| 2150 | 2150 | console.log(buf); | |
| 2151 | - // Prints: <Buffer 43 eb d5 b7 dd f9 5f d7> | ||
| 2151 | + // Prints: <Buffer 40 5e dd 2f 1a 9f be 77> | ||
| 2152 | 2152 | ||
| 2153 | - buf.writeDoubleLE(0xdeadbeefcafebabe, 0); | ||
| 2153 | + buf.writeDoubleLE(123.456, 0); | ||
| 2154 | 2154 | ||
| 2155 | 2155 | console.log(buf); | |
| 2156 | - // Prints: <Buffer d7 5f f9 dd b7 d5 eb 43> | ||
| 2156 | + // Prints: <Buffer 77 be 9f 1a 2f dd 5e 40> | ||
| 2157 | 2157 | ``` | |
| 2158 | 2158 | ||
| 2159 | 2159 | ### buf.writeFloatBE(value, offset) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments