Skip to content
Subhajit Sahu edited this page Aug 9, 2022 · 4 revisions

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

Clone this wiki locally