{
"id": "fn-math-sign",
"dataComponent": "math",
"heading": {
"title": "sign",
"badges": [
"Math",
"JSMath"
]
},
"synopsis": "Returns the sign of a number",
"codeBlocks": [
"extend(\"math\")\n\nsput( math:sign(10) )\n# => 1\n\nsput( math:sign(-5) )\n# => -1\n\nsput( math:sign(0) )\n# => 0"
],
"notes": [
"-1 if negative, +1 if positive, 0 if zero"
]
}