Difference between revisions of "SHIP:Sail:abs"

From Serious Documentation
Jump to: navigation, search
(Detailed Description)
(Detailed Description)
Line 28: Line 28:
 
|}
 
|}
 
== Detailed Description ==
 
== Detailed Description ==
The <code>{{SailFunc|abs}}(number)</code> function returns the absolute value of the specified number.
+
The <code>abs(number)</code> function returns the absolute value of the specified number.
  
 
== Examples ==
 
== Examples ==

Revision as of 05:46, 22 June 2014

See Also:

min

Function Returns Introduced Description
min Integer/Float 2+ Gets the absolute value of a number

Prototype

Integer abs(Integer number);

Float abs(Float number);


Parameters/Return Value

Parameter Data Type Description
number Integer/Float The number to find the absolute value of
Return Integer/Float the absolute value of the supplied number

Detailed Description

The abs(number) function returns the absolute value of the specified number.

Examples

Example Result Notes
abs(-5); 5
abs(0); 0
abs(6); 6