Expand description
Integer/float conventions shared with the adapter. JavaScript’s Math.round rounds halves toward
+∞ and Math.floor(x + .5) does not (it fails just below a half), so the exact form is spelled out.
Structs§
Functions§
- js_ceil
- js_
floor - js_
hypot Math.hypot(x, y)as V8 and JavaScriptCore compute it: scale by the larger magnitude, Kahan-sum the squares, multiply back. Not the correctly rounded libmhypot; poses compared againstdminand sorted by distance must round exactly as the historical adapter did.- js_
round Math.round: nearest integer, halves toward +∞.