• Home
  • Raw
  • Download

Lines Matching refs:function

15   CubicBezier function(0.25, 0.0, 0.75, 1.0);  in TEST()  local
19 EXPECT_NEAR(function.Solve(0), 0, epsilon); in TEST()
20 EXPECT_NEAR(function.Solve(0.05), 0.01136, epsilon); in TEST()
21 EXPECT_NEAR(function.Solve(0.1), 0.03978, epsilon); in TEST()
22 EXPECT_NEAR(function.Solve(0.15), 0.079780, epsilon); in TEST()
23 EXPECT_NEAR(function.Solve(0.2), 0.12803, epsilon); in TEST()
24 EXPECT_NEAR(function.Solve(0.25), 0.18235, epsilon); in TEST()
25 EXPECT_NEAR(function.Solve(0.3), 0.24115, epsilon); in TEST()
26 EXPECT_NEAR(function.Solve(0.35), 0.30323, epsilon); in TEST()
27 EXPECT_NEAR(function.Solve(0.4), 0.36761, epsilon); in TEST()
28 EXPECT_NEAR(function.Solve(0.45), 0.43345, epsilon); in TEST()
29 EXPECT_NEAR(function.Solve(0.5), 0.5, epsilon); in TEST()
30 EXPECT_NEAR(function.Solve(0.6), 0.63238, epsilon); in TEST()
31 EXPECT_NEAR(function.Solve(0.65), 0.69676, epsilon); in TEST()
32 EXPECT_NEAR(function.Solve(0.7), 0.75884, epsilon); in TEST()
33 EXPECT_NEAR(function.Solve(0.75), 0.81764, epsilon); in TEST()
34 EXPECT_NEAR(function.Solve(0.8), 0.87196, epsilon); in TEST()
35 EXPECT_NEAR(function.Solve(0.85), 0.92021, epsilon); in TEST()
36 EXPECT_NEAR(function.Solve(0.9), 0.96021, epsilon); in TEST()
37 EXPECT_NEAR(function.Solve(0.95), 0.98863, epsilon); in TEST()
38 EXPECT_NEAR(function.Solve(1), 1, epsilon); in TEST()
52 CubicBezier function(0.5, -1.0, 0.5, 2.0); in TEST() local
56 EXPECT_NEAR(function.Solve(0.0), 0.0, epsilon); in TEST()
57 EXPECT_NEAR(function.Solve(0.05), -0.08954, epsilon); in TEST()
58 EXPECT_NEAR(function.Solve(0.1), -0.15613, epsilon); in TEST()
59 EXPECT_NEAR(function.Solve(0.15), -0.19641, epsilon); in TEST()
60 EXPECT_NEAR(function.Solve(0.2), -0.20651, epsilon); in TEST()
61 EXPECT_NEAR(function.Solve(0.25), -0.18232, epsilon); in TEST()
62 EXPECT_NEAR(function.Solve(0.3), -0.11992, epsilon); in TEST()
63 EXPECT_NEAR(function.Solve(0.35), -0.01672, epsilon); in TEST()
64 EXPECT_NEAR(function.Solve(0.4), 0.12660, epsilon); in TEST()
65 EXPECT_NEAR(function.Solve(0.45), 0.30349, epsilon); in TEST()
66 EXPECT_NEAR(function.Solve(0.5), 0.50000, epsilon); in TEST()
67 EXPECT_NEAR(function.Solve(0.55), 0.69651, epsilon); in TEST()
68 EXPECT_NEAR(function.Solve(0.6), 0.87340, epsilon); in TEST()
69 EXPECT_NEAR(function.Solve(0.65), 1.01672, epsilon); in TEST()
70 EXPECT_NEAR(function.Solve(0.7), 1.11992, epsilon); in TEST()
71 EXPECT_NEAR(function.Solve(0.75), 1.18232, epsilon); in TEST()
72 EXPECT_NEAR(function.Solve(0.8), 1.20651, epsilon); in TEST()
73 EXPECT_NEAR(function.Solve(0.85), 1.19641, epsilon); in TEST()
74 EXPECT_NEAR(function.Solve(0.9), 1.15613, epsilon); in TEST()
75 EXPECT_NEAR(function.Solve(0.95), 1.08954, epsilon); in TEST()
76 EXPECT_NEAR(function.Solve(1.0), 1.0, epsilon); in TEST()
83 std::unique_ptr<CubicBezier> function( in TEST() local
85 EXPECT_EQ(0, function->range_min()); in TEST()
86 EXPECT_EQ(1, function->range_max()); in TEST()
89 function.reset(new CubicBezier(0.25, -0.5, 0.75, (-1.0 / 6.0))); in TEST()
90 EXPECT_NEAR(function->range_min(), -0.225, epsilon); in TEST()
91 EXPECT_EQ(1, function->range_max()); in TEST()
94 function.reset(new CubicBezier(0.25, 0.25, 0.75, 0.5)); in TEST()
95 EXPECT_EQ(0, function->range_min()); in TEST()
96 EXPECT_EQ(1, function->range_max()); in TEST()
99 function.reset(new CubicBezier(0.0, 1.0, 1.0, 0.0)); in TEST()
100 EXPECT_EQ(0, function->range_min()); in TEST()
101 EXPECT_EQ(1, function->range_max()); in TEST()
104 function.reset(new CubicBezier(0.25, 0.1, 0.75, 0.9)); in TEST()
105 EXPECT_EQ(0, function->range_min()); in TEST()
106 EXPECT_EQ(1, function->range_max()); in TEST()
109 function.reset(new CubicBezier(0.25, 2.5, 0.75, 0.5)); in TEST()
110 EXPECT_EQ(0, function->range_min()); in TEST()
111 EXPECT_NEAR(function->range_max(), 1.28818, epsilon); in TEST()
112 function.reset(new CubicBezier(0.25, 0.5, 0.75, -1.5)); in TEST()
113 EXPECT_NEAR(function->range_min(), -0.28818, epsilon); in TEST()
114 EXPECT_EQ(1, function->range_max()); in TEST()
117 function.reset(new CubicBezier(0.25, 0.1, 0.75, 1.5)); in TEST()
118 EXPECT_EQ(0, function->range_min()); in TEST()
119 EXPECT_NEAR(function->range_max(), 1.10755, epsilon); in TEST()
122 function.reset(new CubicBezier(0.25, -0.5, 0.75, 0.9)); in TEST()
123 EXPECT_NEAR(function->range_min(), -0.10755, epsilon); in TEST()
124 EXPECT_EQ(1, function->range_max()); in TEST()
127 function.reset(new CubicBezier(0.25, 0.3, 0.75, 0.633)); in TEST()
128 EXPECT_EQ(0, function->range_min()); in TEST()
129 EXPECT_EQ(1, function->range_max()); in TEST()
132 function.reset(new CubicBezier(0.25, 0.367, 0.75, 0.7)); in TEST()
133 EXPECT_EQ(0.f, function->range_min()); in TEST()
134 EXPECT_EQ(1.f, function->range_max()); in TEST()
138 CubicBezier function(0.25, 0.0, 0.75, 1.0); in TEST() local
142 EXPECT_NEAR(function.Slope(-0.1), 0, epsilon); in TEST()
143 EXPECT_NEAR(function.Slope(0), 0, epsilon); in TEST()
144 EXPECT_NEAR(function.Slope(0.05), 0.42170, epsilon); in TEST()
145 EXPECT_NEAR(function.Slope(0.1), 0.69778, epsilon); in TEST()
146 EXPECT_NEAR(function.Slope(0.15), 0.89121, epsilon); in TEST()
147 EXPECT_NEAR(function.Slope(0.2), 1.03184, epsilon); in TEST()
148 EXPECT_NEAR(function.Slope(0.25), 1.13576, epsilon); in TEST()
149 EXPECT_NEAR(function.Slope(0.3), 1.21239, epsilon); in TEST()
150 EXPECT_NEAR(function.Slope(0.35), 1.26751, epsilon); in TEST()
151 EXPECT_NEAR(function.Slope(0.4), 1.30474, epsilon); in TEST()
152 EXPECT_NEAR(function.Slope(0.45), 1.32628, epsilon); in TEST()
153 EXPECT_NEAR(function.Slope(0.5), 1.33333, epsilon); in TEST()
154 EXPECT_NEAR(function.Slope(0.55), 1.32628, epsilon); in TEST()
155 EXPECT_NEAR(function.Slope(0.6), 1.30474, epsilon); in TEST()
156 EXPECT_NEAR(function.Slope(0.65), 1.26751, epsilon); in TEST()
157 EXPECT_NEAR(function.Slope(0.7), 1.21239, epsilon); in TEST()
158 EXPECT_NEAR(function.Slope(0.75), 1.13576, epsilon); in TEST()
159 EXPECT_NEAR(function.Slope(0.8), 1.03184, epsilon); in TEST()
160 EXPECT_NEAR(function.Slope(0.85), 0.89121, epsilon); in TEST()
161 EXPECT_NEAR(function.Slope(0.9), 0.69778, epsilon); in TEST()
162 EXPECT_NEAR(function.Slope(0.95), 0.42170, epsilon); in TEST()
163 EXPECT_NEAR(function.Slope(1), 0, epsilon); in TEST()
164 EXPECT_NEAR(function.Slope(1.1), 0, epsilon); in TEST()