Difference between revisions of "SHIP:Sail:neg"

From Serious Documentation
Jump to: navigation, search
Line 38: Line 38:
 
|<code>{{SailFunc|neg}}(-82);</code> || 82.0 ||
 
|<code>{{SailFunc|neg}}(-82);</code> || 82.0 ||
 
|}
 
|}
 +
 +
[[Category:Numeric Functions]]

Revision as of 15:18, 10 October 2016

Function Returns Introduced Description
neg Integer/Float v5.1.0 Return the negative of the given numberBadge SHIPv5.gif

See Also:

Prototype

Float neg(Integer n);

Parameters/Return Value

Parameter Data Type Description
n Integer/Float the number to negate
Return Float the result of -(n)

Detailed Description

The neg() function returns the given number * -1.

Examples

Example Result Notes
neg(3.14); -3.14
neg(-82); 82.0