pandemonium_engine/platform/javascript/js
Relintai bcf96a5840 Ported: Improve performance of screen_get_dpi() in Javascript
Replace a bisect with a single multiplication when calling
screen_get_dpi() in Javascript

Tested the value of
window.matchMedia(`(resolution:${(window.devicePixelRatio*96).toFixed(100)}dpi)`).matches
which is true except for values that cause a lot of rounding errors
(e.g. dpr : 0.3  => resolution: 28.799999999999997dpi)

Even in these cases the value matches the result of the previous
`findDPI()` method.
-jamie-pate
562d7c616d
2022-09-16 21:15:54 +02:00
..
engine Ported: HTML5: Make OS.get_locale() match other platforms 2022-07-29 20:54:31 +02:00
jsdoc2rst Added godot with all my currently used engine modules. 2022-03-15 13:29:32 +01:00
libs Ported: Improve performance of screen_get_dpi() in Javascript 2022-09-16 21:15:54 +02:00