{
"id": "fn-math-hypot",
"dataComponent": "math",
"heading": {
"title": "hypot",
"badges": ["Math", "JSMath", "PARTIAL"]
},
"synopsis": "Returns the square root of the sum of squares of all given arguments. (Variadic) Partial usage is supported for passing multiple numbers incrementally.",
"codeBlocks": [
"extend(\"math\")\\n\\n# Direct usage: multiple arguments\\nsput( math:hypot(3, 4) )\\n# => 5\\n\\n# Variadic usage:\\nsput( math:hypot(3, 4, 12, 84) )\\n# => sqrt(3^2 + 4^2 + 12^2 + 84^2)\\n\\n# Partial usage => supply some arguments first\\nsomeHypot = math:hypot(6)\\n# => function waiting for more numbers\\nsput( someHypot(8, 10) )\\n# => sqrt(36 + 64 + 100) => 13"
],
"notes": [
"Any number of numeric arguments. Summation of squares => sqrt(...) is computed and returned as float.",
"If called with fewer arguments, partial usage accumulates them until all are known, then calculates the final result on call."
]
}