2 ms·
I suggested a similar trick in Gecko when we were seeing too many bugs in the rendering/async scrolling code because of mistakes when transforming between the d
by bgirard 8y ago
I suggested a similar trick in Gecko when we were seeing too many bugs in the rendering/async scrolling code because of mistakes when transforming between the different unit spaces:
https://dxr.mozilla.org/mozilla-central/rev/4303d49c53931385892231969e40048f096b4d4c/layout/base/Units.h#385-465 https://dxr.mozilla.org/mozilla-central/rev/4303d49c53931385...
Transformations between units are also typed so you wont accidentally use the wrong scale factor when transforming.
- Gibbon1 8y agoWorking on porting code with time units that are totally unspecified. Sometimes it's seconds, ms, 1/256th of a second or HH:MM:SS. Just shoot me.
- insulanian 8y agoYou need F#'s units of measure [1]. [1] https://fsharpforfunandprofit.com/posts/units-of-measure/ https://fsharpforfunandprofit.com/posts/units-of-measure/