@@ -92,10 +92,10 @@ TEST(Keyframe_GetValue_For_Bezier_Curve_2_Points)
9292 // Spot check values from the curve
9393 CHECK_CLOSE (1 .0f , kf.GetValue (-1 ), 0.0001 );
9494 CHECK_CLOSE (1 .0f , kf.GetValue (0 ), 0.0001 );
95- CHECK_CLOSE (1 .00023f , kf.GetValue (1 ), 0.0001 );
96- CHECK_CLOSE (1 .14025f , kf.GetValue (9 ), 0.0001 );
97- CHECK_CLOSE (1 .91492f , kf.GetValue (20 ), 0.0001 );
98- CHECK_CLOSE (3 .81602f , kf.GetValue (40 ), 0.0001 );
95+ CHECK_CLOSE (1 .0f , kf.GetValue (1 ), 0.0001 );
96+ CHECK_CLOSE (1 .12414f , kf.GetValue (9 ), 0.0001 );
97+ CHECK_CLOSE (1 .86370f , kf.GetValue (20 ), 0.0001 );
98+ CHECK_CLOSE (3 .79733f , kf.GetValue (40 ), 0.0001 );
9999 CHECK_CLOSE (4 .0f , kf.GetValue (50 ), 0.0001 );
100100 // Check the expected number of values
101101 CHECK_EQUAL (kf.GetLength (), 51 );
@@ -114,11 +114,11 @@ TEST(Keyframe_GetValue_For_Bezier_Curve_5_Points_40_Percent_Handle)
114114 // Spot check values from the curve
115115 CHECK_CLOSE (kf.GetValue (-1 ), 1 .0f , 0.0001 );
116116 CHECK_CLOSE (1 .0f , kf.GetValue (0 ), 0.0001 );
117- CHECK_CLOSE (1 .00023f , kf.GetValue (1 ), 0.0001 );
118- CHECK_CLOSE (2 .73656f , kf.GetValue (27 ), 0.0001 );
119- CHECK_CLOSE (7 .55139f , kf.GetValue (77 ), 0.0001 );
120- CHECK_CLOSE (4 .08102f , kf.GetValue (127 ), 0.0001 );
121- CHECK_CLOSE (1 .77569f , kf.GetValue (177 ), 0.0001 );
117+ CHECK_CLOSE (1 .0f , kf.GetValue (1 ), 0.0001 );
118+ CHECK_CLOSE (2 .68197f , kf.GetValue (27 ), 0.0001 );
119+ CHECK_CLOSE (7 .47719f , kf.GetValue (77 ), 0.0001 );
120+ CHECK_CLOSE (4 .20468f , kf.GetValue (127 ), 0.0001 );
121+ CHECK_CLOSE (1 .73860f , kf.GetValue (177 ), 0.0001 );
122122 CHECK_CLOSE (3 .0f , kf.GetValue (200 ), 0.0001 );
123123 // Check the expected number of values
124124 CHECK_EQUAL (kf.GetLength (), 201 );
@@ -137,11 +137,11 @@ TEST(Keyframe_GetValue_For_Bezier_Curve_5_Points_25_Percent_Handle)
137137 // Spot check values from the curve
138138 CHECK_CLOSE (1 .0f , kf.GetValue (-1 ), 0.0001 );
139139 CHECK_CLOSE (1 .0f , kf.GetValue (0 ), 0.0001 );
140- CHECK_CLOSE (1 .00023f , kf.GetValue (1 ), 0.0001 );
141- CHECK_CLOSE (2 .73656f , kf.GetValue (27 ), 0.0001 );
142- CHECK_CLOSE (7 .55139f , kf.GetValue (77 ), 0.0001 );
143- CHECK_CLOSE (4 .08102f , kf.GetValue (127 ), 0.0001 );
144- CHECK_CLOSE (1 .77569f , kf.GetValue (177 ), 0.0001 );
140+ CHECK_CLOSE (1 .0f , kf.GetValue (1 ), 0.0001 );
141+ CHECK_CLOSE (2 .68197f , kf.GetValue (27 ), 0.0001 );
142+ CHECK_CLOSE (7 .47719f , kf.GetValue (77 ), 0.0001 );
143+ CHECK_CLOSE (4 .20468f , kf.GetValue (127 ), 0.0001 );
144+ CHECK_CLOSE (1 .73860f , kf.GetValue (177 ), 0.0001 );
145145 CHECK_CLOSE (3 .0f , kf.GetValue (200 ), 0.0001 );
146146 // Check the expected number of values
147147 CHECK_EQUAL (kf.GetLength (), 201 );
@@ -200,7 +200,7 @@ TEST(Keyframe_Check_Direction_and_Repeat_Fractions)
200200 CHECK_EQUAL (kf.GetInt (1 ), 500 );
201201 CHECK_EQUAL (kf.IsIncreasing (1 ), false );
202202 CHECK_EQUAL (kf.GetRepeatFraction (1 ).num , 1 );
203- CHECK_EQUAL (kf.GetRepeatFraction (1 ).den , 12 );
203+ CHECK_EQUAL (kf.GetRepeatFraction (1 ).den , 13 );
204204 CHECK_EQUAL (kf.GetDelta (1 ), 500 );
205205
206206 CHECK_EQUAL (kf.GetInt (24 ), 498 );
@@ -212,13 +212,13 @@ TEST(Keyframe_Check_Direction_and_Repeat_Fractions)
212212 CHECK_EQUAL (kf.GetLong (390 ), 100 );
213213 CHECK_EQUAL (kf.IsIncreasing (390 ), true );
214214 CHECK_EQUAL (kf.GetRepeatFraction (390 ).num , 3 );
215- CHECK_EQUAL (kf.GetRepeatFraction (390 ).den , 15 );
215+ CHECK_EQUAL (kf.GetRepeatFraction (390 ).den , 16 );
216216 CHECK_EQUAL (kf.GetDelta (390 ), 0 );
217217
218218 CHECK_EQUAL (kf.GetLong (391 ), 100 );
219219 CHECK_EQUAL (kf.IsIncreasing (391 ), true );
220220 CHECK_EQUAL (kf.GetRepeatFraction (391 ).num , 4 );
221- CHECK_EQUAL (kf.GetRepeatFraction (391 ).den , 15 );
221+ CHECK_EQUAL (kf.GetRepeatFraction (391 ).den , 16 );
222222 CHECK_EQUAL (kf.GetDelta (388 ), -1 );
223223}
224224
@@ -307,21 +307,21 @@ TEST(Keyframe_Scale_Keyframe)
307307 CHECK_CLOSE (1 .0f , kf.GetValue (1 ), 0.01 );
308308 CHECK_CLOSE (7 .99f , kf.GetValue (24 ), 0.01 );
309309 CHECK_CLOSE (8 .0f , kf.GetValue (25 ), 0.01 );
310- CHECK_CLOSE (3 .68f , kf.GetValue (40 ), 0.01 );
311- CHECK_CLOSE (2 .0f , kf.GetValue (49 ), 0.01 );
310+ CHECK_CLOSE (3 .85f , kf.GetValue (40 ), 0.01 );
311+ CHECK_CLOSE (2 .01f , kf.GetValue (49 ), 0.01 );
312312 CHECK_CLOSE (2 .0f , kf.GetValue (50 ), 0.01 );
313313
314314 // Resize / Scale the keyframe
315315 kf.ScalePoints (2.0 ); // 100% larger
316316
317317 // Spot check values from the curve
318318 CHECK_CLOSE (1 .0f , kf.GetValue (1 ), 0.01 );
319- CHECK_CLOSE (4 .21f , kf.GetValue (24 ), 0.01 );
320- CHECK_CLOSE (4 .47f , kf.GetValue (25 ), 0.01 );
321- CHECK_CLOSE (7 .57f , kf.GetValue (40 ), 0.01 );
319+ CHECK_CLOSE (4 .08f , kf.GetValue (24 ), 0.01 );
320+ CHECK_CLOSE (4 .36f , kf.GetValue (25 ), 0.01 );
321+ CHECK_CLOSE (7 .53f , kf.GetValue (40 ), 0.01 );
322322 CHECK_CLOSE (7 .99f , kf.GetValue (49 ), 0.01 );
323323 CHECK_CLOSE (8 .0f , kf.GetValue (50 ), 0.01 );
324- CHECK_CLOSE (2 .35f , kf.GetValue (90 ), 0.01 );
324+ CHECK_CLOSE (2 .39f , kf.GetValue (90 ), 0.01 );
325325 CHECK_CLOSE (2 .0f , kf.GetValue (100 ), 0.01 );
326326
327327 // Resize / Scale the keyframe
@@ -331,8 +331,8 @@ TEST(Keyframe_Scale_Keyframe)
331331 CHECK_CLOSE (1 .0f , kf.GetValue (1 ), 0.01 );
332332 CHECK_CLOSE (7 .99f , kf.GetValue (24 ), 0.01 );
333333 CHECK_CLOSE (8 .0f , kf.GetValue (25 ), 0.01 );
334- CHECK_CLOSE (3 .68f , kf.GetValue (40 ), 0.01 );
335- CHECK_CLOSE (2 .0f , kf.GetValue (49 ), 0.01 );
334+ CHECK_CLOSE (3 .85f , kf.GetValue (40 ), 0.01 );
335+ CHECK_CLOSE (2 .01f , kf.GetValue (49 ), 0.01 );
336336 CHECK_CLOSE (2 .0f , kf.GetValue (50 ), 0.01 );
337337
338338}
0 commit comments