Let's say I have a long decimal-place number and I want to use that to set the value of a dom element css width.
ex: 46.37524456801565
The browser can only render in natural number pixel units so rounding must occur. 46.37524456801565 becomes 46 pixels, for example.
Is it more performant to let the browser do the rounding or better to perform some rounding in javascript so the browser is only given a natural number?
In my case, the element width is being updated every 500ms with a new number so I'm curious to know whether I should be rounding/flooring in javascript.
edit: rephrased question for clarity