Documentation

Sign

Table of Contents

evaluate() SIGN. int|string

Methods

evaluate()

SIGN.

public static evaluate( $number : float ) : int|string

Determines the sign of a number. Returns 1 if the number is positive, zero (0) if the number is 0, and -1 if the number is negative.

Parameters
$number : float

Number to round

Return values
int|string —

sign value, or a string containing an error

Search results