Skip to content

Wrong logic in computeLatitudePrecision #739

Open
@sbr61

Description

@sbr61

computeLatitudePrecision uses a wrong logic:

Instead, it should compare

codeLength <= PAIR_CODE_LENGTH

The two constants have different semantics, but the same value (namely 10). So this issue is about code cleanness, not about a wrong run-time behavior.

When fixed, CODE_PRECISION_NORMAL would just determine the default precision for the two-parameter encode. It might then be increased to 11 to match the OLC precision shown by Google Maps for pins, which is about the GPS accuracy in phones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions