Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for BufferwriteDoubleLE/writeDoubleBE is confusing #22158

Closed
broofa opened this issue Aug 6, 2018 · 1 comment
Closed

Documentation for BufferwriteDoubleLE/writeDoubleBE is confusing #22158

broofa opened this issue Aug 6, 2018 · 1 comment
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors.

Comments

@broofa
Copy link

broofa commented Aug 6, 2018

The documentation for these methods has the following:

buf.writeDoubleBE(0xdeadbeefcafebabe, 0);

However 0xdeadbeefcafebabe a particularly poor value choice. To the naive reader, it implies this method is for writing 64-bit integers, and that JS supports 64 bit integers (which it doesn't. E.g. (0xdeadbeefcafebabe).toString(16) yields deadbeefcafeb800).

It would be clearer if the example used something like 1234.5678 or Math.PI or 1.2345e67 .

@ChALkeR ChALkeR added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. labels Aug 6, 2018
@joyeecheung joyeecheung added the good first issue Issues that are suitable for first-time contributors. label Aug 7, 2018
@pranshuchittora
Copy link
Contributor

Fixed : #22170

targos pushed a commit that referenced this issue Sep 2, 2018
Documentation for BufferwriteDoubleLE/writeDoubleBE is confusing

PR-URL: #22170
Fixes: #22158
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit that referenced this issue Sep 3, 2018
Documentation for BufferwriteDoubleLE/writeDoubleBE is confusing

PR-URL: #22170
Fixes: #22158
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit that referenced this issue Sep 6, 2018
Documentation for BufferwriteDoubleLE/writeDoubleBE is confusing

PR-URL: #22170
Fixes: #22158
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

No branches or pull requests

4 participants