跳到正文
本页尚未翻译成中文,以下为英文原文。 查看英文版

signum Function ​

signum determines the sign of a number, returning a number between -1 and 1 to represent the sign.

Examples ​

shellsession
> signum(-13)
-1
> signum(0)
0
> signum(344)
1

基于 MPL-2.0 许可证发布。