SIGN

Transfers the sign of one expression representing a numerical value to the magnitude of another expression representing a numerical value:
SIGN(a1, a2) = ABS(a1) if a2 > 0
SIGN(a1, a2) = -ABS(a1) if a2 < 0 
 
Note:  
SIGN is discontinuous. Use this function with care to avoid creating expressions that are discontinuous.

Format

SIGN (x1,x2)

Arguments

 
x1
Any valid expression that evaluates to a real number.
x2
Any valid expression that evaluates to a real number.

Example

In the following function,
When VZ(marker_2, marker_3) > 0, the value is ABS(TIME). When VZ(marker_2, marker_3)< 0, the value is -ABS(TIME).    SIGN(TIME,VZ(marker_2, marker_3))