Re: [mediacapture-image] Add pan and tilt constraints

> Reading through this, I don't have a strong opinion on rounding errors, but I would like to point out the several other ways that @dsanders11's example won't work

It also won't work because it simply sets a magical `lockUI` variable. It wasn't meant to be a working example (which is why I said it wasn't great code) but quick pseudo-code to highlight the potential problem lurking due to the float rounding.

It's not an example being inserted into the spec, I don't see how it is useful in moving this discussion forward to pick it apart on ancillary details.

The point being illustrated was that a seemingly intuitive use of simple equality may unexpectedly fail. You also used a simple equality check in the code you supplied in the issue you filed regarding `applyConstraints()`. You have to go out of your way to write code that would be immune to the float rounding problem. We have an opportunity to insulate end users from that problem, one many would not be aware of.

-- 
GitHub Notification of comment by dsanders11
Please view or discuss this issue at https://github.com/w3c/mediacapture-image/pull/182#issuecomment-310796305 using your GitHub account

Received on Friday, 23 June 2017 23:47:17 UTC