Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[core] Precision loss in Transform::flyTo #4298

@brunoabinader

Description

@brunoabinader

Transform::flyTo loses more precision than Transform::easeTo when animating. Example:

Given point A LatLng { -45, -135 } and point B LatLng { 45, 135 }:
Transform::easeTo from point A to B: LatLng { 44.999999999695532, 135.00000000038369 }

  • Latitude precision loss: 45 - 44.999999999695532 = 3.0446756E-10
  • Longitude precision loss: 135 - 135.00000000038369 = -3.8369308E-10

Transform::flyTo from point B to A: LatLng { -44.999808628745399, -135.00024116863571 }

  • Latitude precision loss: -45 + 44.999808628745399 = -1.9137125E-4
  • Longitude precision loss: -135 + 135.00024116863571 = 2.4116863E-4

The exponent of precision loss from easeTo is -10, while flyTo is -4.

/cc @1ec5

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreThe cross-platform C++ core, aka mbglarchivedArchived because of inactivitybug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions