forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfloor.lcdoc
More file actions
46 lines (30 loc) · 1.02 KB
/
floor.lcdoc
File metadata and controls
46 lines (30 loc) · 1.02 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
Name: floor
Type: function
Syntax: the floor of <number>
Syntax: floor(<number>)
Summary:
<return|Returns> the greatest integer less than or equal to number.
Introduced: 7.1
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
floor(33.567) -- result is 33
Example:
floor(-6.3) -- result is -7
Parameters:
number:
Any number, or expression that evaluates to a number.
Returns:
The <floor> <function> <return|returns> an <integer>.
Description:
Use the <floor> <function> to return the greatest integer less than or
equal to a number.
The <floor> <function> is different from <round> in that floor
completely ignores the fractional part of the number. For example,
`floor(5.1)` <return|returns> 5, but `floor(4.99)` <return|returns> 4.
This means that the <floor> function does not always <return> the
<integer> closest to the <number>.
References: function (control structure),
ceiling (function), round (function), abs (function), trunc (function),
return (glossary), integer (keyword)
Tags: math