forked from stylus/stylus
/
bifs.math.styl
73 lines (65 loc) · 1.22 KB
/
bifs.math.styl
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.math
test1: ceil(0.5)
test2: floor(0.5)
test3: round(0.5)
.math_units
test1: ceil(0.5px)
test2: floor(0.5px)
test3: round(0.5px)
.math_precision0
test1: ceil(0.47,0)
test2: floor(0.47,0)
test3: round(0.47,0)
.math_precision1
test1: ceil(0.47,1)
test2: floor(0.47,1)
test3: round(0.47,1)
.math_precision2
test1: ceil(0.472,2)
test2: floor(0.472,2)
test3: round(0.472,2)
.math_PI
foo: PI
.math_sin
test1: sin(0)
test2: sin(30deg)
test3: sin(45deg)
test4: sin(60deg)
test5: sin(90deg)
test6: sin(180deg)
test7: sin(270deg)
test8: sin(360deg)
.math_cos
test1: cos(0)
test2: cos(30deg)
test3: cos(45deg)
test4: cos(60deg)
test5: cos(90deg)
test6: cos(180deg)
test7: cos(270deg)
test8: cos(360deg)
.math_tan
test1: tan(0)
test2: tan(30deg)
test3: tan(45deg)
test4: tan(60deg)
test5: tan(90deg)
test6: tan(180deg)
test7: tan(270deg)
test8: tan(360deg)
.math_sin_rad
test1: sin(2*PI/3)
test2: sin(3*PI/4)
test3: sin(5*PI/6)
test4: sin(7*PI/6)
test5: sin(5*PI/4)
test6: sin(4*PI/3)
test7: sin(5*PI/3)
test8: sin(7*PI/4)
test9: sin(11*PI/6)
.math_atan
test1: atan(tan(45deg))
.math_asin
test1: asin(sin(45deg))
.math_acos
test1: acos(cos(45deg))