hypot - nodef/extra-bigint GitHub Wiki

Find the length of hypotenuse.

function hypot(...xs)
// xs: lengths of perpendicular sides (x, y, z, ...)
const xbigint = require('extra-bigint');


xbigint.hypot(3n, 4n);
// → 5n

xbigint.hypot(8n, 15n);
// → 17n

xbigint.hypot(6n, 8n);
// → 10n

References