Difference between revisions of "SHIP:Sail:neg"

From Serious Documentation
Jump to: navigation, search
Line 34: Line 34:
 
! scope="col" style="text-align:left" | Notes
 
! scope="col" style="text-align:left" | Notes
 
|-
 
|-
|<code>{{SailFunc|neg}}(3.14);</code> || 1.0 ||
+
|<code>{{SailFunc|neg}}(3.14);</code> || 3.14 ||
 
|-
 
|-
 
|<code>{{SailFunc|neg}}(82);</code> || 82.0 ||
 
|<code>{{SailFunc|neg}}(82);</code> || 82.0 ||
 
|}
 
|}

Revision as of 16:54, 29 September 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