10 lines
158 B
JavaScript
10 lines
158 B
JavaScript
|
const sqrt = Math.sqrt;
|
||
|
function square(x) {
|
||
|
return x * x;
|
||
|
}
|
||
|
function diag(x, y) {
|
||
|
return sqrt(square(x) + square(y));
|
||
|
}
|
||
|
|
||
|
export {sqrt, square, diag}
|