mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Map#setBearing handles some floats and integers incorrectly

Open flawyte opened this issue 5 years ago • 5 comments

mapbox-gl-js version: 0.52.0

browser: Chrome 71.0.3578.98 (Official Build) (64-bit)

Steps to Trigger Behavior

  1. Make sure the map's bearing is set to an integer value
  2. Set the bearing to a small float value
  3. Read the bearing ‒ it's not the right value

Link to Demonstration

https://jsbin.com/harefagilu/edit?html,console

Expected Behavior

Bearing should equal 0.1.

Actual Behavior

Bearing equals 0.10000000000002274.

flawyte avatar Jan 01 '19 13:01 flawyte