{
"id": "fn-math-abs",
"dataComponent": "math",
"heading": {
"title": "abs",
"badges": [
"Math",
"JSMath"
]
},
"synopsis": "Returns the absolute value of a single numeric argument.",
"codeBlocks": [
"extend(\"math\")\n\nsput( math:abs(-42) )\n# => 42\n\nsput( math:abs(3.14) )\n# => 3.14\n"
],
"notes": [
"Accepts exactly 1 numeric argument (int, float, or something coercible).",
"Returns the absolute value as an int or float, depending on your environment’s bridging.",
"If called with non-numeric or multiple arguments, it raises an error."
]
}