Was this page helpful?

Num.Sign

    Table of contents
    1. 1. Usage Restrictions
    2. 2. Parameters
    3. 3. Result
    4. 4. Samples
    num.Sign(number : num) : num
    

    Get a value indicating the sign of the number.

    Usage Restrictions

    1.9.1 or later

    Parameters

    Name Type Description
    number
    num The number value.

     

    Result

    returns 1 : if number > 0

    returns 0 : if number = 0

    returns -1 : if number < 0

     

    Samples


    Output

    To find the signed number:

    {{num.sign(25) }} 

     

    1

    To find the signed number:

    {{num.sign(0) }} 

     

    0

    To find the signed number:

    {{num.sign(-36) }} 

     

    -1
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by