Sign?

angerangel edited this page Jan 7, 2013 · 1 revision
Clone this wiki locally

USAGE

   SIGN? number

DESCRIPTION

Returns sign of number as 1, 0, or -1 (to use as multiplier).

SIGN? is a function value.

ARGUMENTS

  • number (number! money! time!)

#SOURCE

sign?: make function! [  [
    {Returns sign of number as 1, 0, or -1 (to use as multiplier).}
    number [number! money! time!]
][
    case [
        positive? number [1]
        negative? number [-1]
        true [0]
    ]
] ]