User:Σ/Testing facility/Sgn/doc
Appearance
This is a documentation subpage for User:Σ/Testing facility/Sgn. It may contain usage information, categories and other content that is not part of the original user template page. |
This template evaluates its numeric parameter and returns its mathematical sign. If the parameter is empty or missing, it returns an empty string. Otherwise, the return value is 1 if the parameter is positive, 0 if it is null, -1 if negative.
- Syntax:
- {{Σ/Testing facility/Sgn|value}}
- Examples:
- "{{Σ/Testing facility/Sgn|100}}" = "1".
- "{{Σ/Testing facility/Sgn|0.1}}" = "1".
- "{{Σ/Testing facility/Sgn|1-1}}" = "0".
- "{{Σ/Testing facility/Sgn|-0.1}}" = "-1".
- "{{Σ/Testing facility/Sgn|-100}}" = "-1".
- "{{Σ/Testing facility/Sgn|}}" = "".