w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

Use range instead of `float` for angle values #555

Closed jrandolf closed 9 months ago

jrandolf commented 9 months ago

Preview | Diff

jrandolf commented 9 months ago

LGTM but how many digits should we use for the decimals?

The print to PDF example was the first one where this happened, and we only used 4 decimals (rounding up).

Will implementations keep this precision? I'd suggest to round up to 4 decimals or so.

Considering 6.283185307179586 === (Math.PI * 2), we should keep it at that precision.