-
Notifications
You must be signed in to change notification settings - Fork 2
hypot
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