syntax:functions:sign

Sign of a number. The sign of a number is 1 when the number is positive, and −1 when the number is negative. The number zero is neither positive nor negative, and therefore has no sign.

Example | Result |
---|---|

sign(0 - 85) | -1 |

sign(0) | 0 |

sign(125.1231) | 1 |

Note: keep in mind that EasyMorph doesn't support unary minus in expressions - see Example 1 above.

syntax/functions/sign.txt · Last modified: 2016/06/20 11:58 by dmitry