Skip to content

Documentation for BufferwriteDoubleLE/writeDoubleBE is confusing #22158

Closed
@broofa

Description

@broofa

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.docIssues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions