forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathabs.lcdoc
More file actions
52 lines (34 loc) · 1.05 KB
/
abs.lcdoc
File metadata and controls
52 lines (34 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Name: abs
Type: function
Syntax: the abs of <number>
Syntax: abs(<number>)
Summary:
<return|Returns> the absolute value of a number.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
abs(14)
Example:
the abs of -14
Example:
abs(firstNum - secondNum)
Example:
abs(secondNum - firstNum)
Parameters:
number:
A positive or negative number, or any expression that evaluates to a
number.
Returns:
The <abs> <function> <return|returns> a positive number.
Description:
Use the <abs> <function> if you need to know the magnitude of the number
and are not concerned about whether it is negative or not.
The absolute value of a <number> is that number's distance from zero. If
the <number> is positive, its absolute value is just the number; if the
<number> is <negative>, its absolute value is the <negative> of the
number. Because of this, the absolute value of a number is always
positive.
References: function (control structure), trunc (function),
round (function), negative (glossary), return (glossary)
Tags: math