- From: Ian Kilpatrick via GitHub <sysbot+gh@w3.org>
- Date: Thu, 25 Oct 2018 09:39:41 +0000
- To: public-houdini-archive@w3.org
bfgeek has just created a new issue for https://github.com/w3c/css-houdini-drafts:
== [css-layout-api] Precision and rounding of the css-layout-api. ==
Currently in the specification no rounding of inputs/outputs occurs.
For example:
```js
const fragment = await child.layoutNextFragment({
availableInlineSize: 10.13,
});
```
The internal representation will be:
| 1/64 representation | 1/60 representation | 1/100 representation |
|---|---|---|
| 10.125 | 10.133... | 10.13 |
If the above child is a block "auto" sized. Then the `fragment.inlineSize` will be:
| 1/64 representation | 1/60 representation | 1/100 representation |
|---|---|---|
| 10.125 | 10.133331298828125 | 10.133331298828125 (i think?) |
These quirks are exposed to web developers today:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=6316
Precision is typically kept when going from `internal` -> `JS 52bit float` -> `internal` due to the relatively high floating precision of the JS representation.
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/830 using your GitHub account
Received on Thursday, 25 October 2018 09:39:42 UTC