-
Notifications
You must be signed in to change notification settings - Fork 3
/
ceil.yml
53 lines (53 loc) · 907 Bytes
/
ceil.yml
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
52
53
name: ceil
topic: math
args:
required:
- name: value
type: [number]
desc: ""
optional: []
returns:
type: number
desc: ""
desc: |
Returns the next highest integer value by rounding up if necessary.
examples:
- context:
args: [1.001]
returns: 2
- context:
args: [1.9]
returns: 2
- context:
args: [1]
returns: 1
- context:
args: [abc]
returns:
- context: &data
foo: -1
zero: 0
numbers: [-1, 3, 4, 5]
array: [-1, 3, 4, 5, a, '100']
strings: [a, b, c]
decimals: [1.01, 1.2, -1.5]
str: Str
'false': false
empty_list: []
empty_hash: {}
objects: {foo: bar, bar: baz}
null_key:
args: ['`1.2`']
returns: 2
- context: *data
args: ['decimals[0]']
returns: 2
- context: *data
args: ['decimals[1]']
returns: 2
- context: *data
args: ['decimals[2]']
returns: -1
- context: *data
args: ["'string'"]
error: invalid-type