Lines Matching refs:mInterpolator
24 private final HermiteInterpolator mInterpolator = new HermiteInterpolator();
62 mInterpolator.reset(mXCoords, mYCoords, p0, p3 + 1);
63 mInterpolator.setInterval(p0 - 1, p0, p1, p1 + 1);
64 assertEquals("p0x", mXCoords[p0], mInterpolator.mP1X);
65 assertEquals("p0y", mYCoords[p0], mInterpolator.mP1Y);
66 assertEquals("p1x", mXCoords[p1], mInterpolator.mP2X);
67 assertEquals("p1y", mYCoords[p1], mInterpolator.mP2Y);
69 assertFloatEquals("slope x p0", -0.25f, mInterpolator.mSlope1X);
70 assertFloatEquals("slope y p0", -0.75f, mInterpolator.mSlope1Y);
72 assertFloatEquals("slope x p1", 1.50f, mInterpolator.mSlope2X);
73 assertFloatEquals("slope y p1", 0.50f, mInterpolator.mSlope2Y);
75 mInterpolator.interpolate(0.0f);
76 assertFloatEquals("t=0.0 x", 0.0f, mInterpolator.mInterpolatedX);
77 assertFloatEquals("t=0.0 y", 1.0f, mInterpolator.mInterpolatedY);
79 mInterpolator.interpolate(0.2f);
80 assertFloatEquals("t=0.2 x", 0.02400f, mInterpolator.mInterpolatedX);
81 assertFloatEquals("t=0.2 y", 0.78400f, mInterpolator.mInterpolatedY);
83 mInterpolator.interpolate(0.5f);
84 assertFloatEquals("t=0.5 x", 0.28125f, mInterpolator.mInterpolatedX);
85 assertFloatEquals("t=0.5 y", 0.34375f, mInterpolator.mInterpolatedY);
87 mInterpolator.interpolate(0.8f);
88 assertFloatEquals("t=0.8 x", 0.69600f, mInterpolator.mInterpolatedX);
89 assertFloatEquals("t=0.8 y", 0.01600f, mInterpolator.mInterpolatedY);
91 mInterpolator.interpolate(1.0f);
92 assertFloatEquals("t=1.0 x", 1.0f, mInterpolator.mInterpolatedX);
93 assertFloatEquals("t=1.0 y", 0.0f, mInterpolator.mInterpolatedY);
98 mInterpolator.reset(mXCoords, mYCoords, p0, p3 + 1);
99 mInterpolator.setInterval(p1 - 1, p1, p2, p2 + 1);
100 assertEquals("p1x", mXCoords[p1], mInterpolator.mP1X);
101 assertEquals("p1y", mYCoords[p1], mInterpolator.mP1Y);
102 assertEquals("p2x", mXCoords[p2], mInterpolator.mP2X);
103 assertEquals("p2y", mYCoords[p2], mInterpolator.mP2Y);
105 assertFloatEquals("slope x p1", 1.50f, mInterpolator.mSlope1X);
106 assertFloatEquals("slope y p1", 0.50f, mInterpolator.mSlope1Y);
108 assertFloatEquals("slope x p2", 0.50f, mInterpolator.mSlope2X);
109 assertFloatEquals("slope y p2", 1.50f, mInterpolator.mSlope2Y);
111 mInterpolator.interpolate(0.0f);
112 assertFloatEquals("t=0.0 x", 1.0f, mInterpolator.mInterpolatedX);
113 assertFloatEquals("t=0.0 y", 0.0f, mInterpolator.mInterpolatedY);
115 mInterpolator.interpolate(0.2f);
116 assertFloatEquals("t=0.2 x", 1.384f, mInterpolator.mInterpolatedX);
117 assertFloatEquals("t=0.2 y", 0.224f, mInterpolator.mInterpolatedY);
119 mInterpolator.interpolate(0.5f);
120 assertFloatEquals("t=0.5 x", 2.125f, mInterpolator.mInterpolatedX);
121 assertFloatEquals("t=0.5 y", 0.875f, mInterpolator.mInterpolatedY);
123 mInterpolator.interpolate(0.8f);
124 assertFloatEquals("t=0.8 x", 2.776f, mInterpolator.mInterpolatedX);
125 assertFloatEquals("t=0.8 y", 1.616f, mInterpolator.mInterpolatedY);
127 mInterpolator.interpolate(1.0f);
128 assertFloatEquals("t=1.0 x", 3.0f, mInterpolator.mInterpolatedX);
129 assertFloatEquals("t=1.0 y", 2.0f, mInterpolator.mInterpolatedY);
134 mInterpolator.reset(mXCoords, mYCoords, p0, p3 + 1);
135 mInterpolator.setInterval(p2 - 1, p2, p3, p3 + 1);
136 assertEquals("p2x", mXCoords[p2], mInterpolator.mP1X);
137 assertEquals("p2y", mYCoords[p2], mInterpolator.mP1Y);
138 assertEquals("p3x", mXCoords[p3], mInterpolator.mP2X);
139 assertEquals("p3y", mYCoords[p3], mInterpolator.mP2Y);
141 assertFloatEquals("slope x p2", 0.50f, mInterpolator.mSlope1X);
142 assertFloatEquals("slope y p2", 1.50f, mInterpolator.mSlope1Y);
144 assertFloatEquals("slope x p3", -0.75f, mInterpolator.mSlope2X);
145 assertFloatEquals("slope y p3", -0.25f, mInterpolator.mSlope2Y);
147 mInterpolator.interpolate(0.0f);
148 assertFloatEquals("t=0.0 x", 3.0f, mInterpolator.mInterpolatedX);
149 assertFloatEquals("t=0.0 y", 2.0f, mInterpolator.mInterpolatedY);
151 mInterpolator.interpolate(0.2f);
152 assertFloatEquals("t=0.2 x", 2.98400f, mInterpolator.mInterpolatedX);
153 assertFloatEquals("t=0.2 y", 2.30400f, mInterpolator.mInterpolatedY);
155 mInterpolator.interpolate(0.5f);
156 assertFloatEquals("t=0.5 x", 2.65625f, mInterpolator.mInterpolatedX);
157 assertFloatEquals("t=0.5 y", 2.71875f, mInterpolator.mInterpolatedY);
159 mInterpolator.interpolate(0.8f);
160 assertFloatEquals("t=0.8 x", 2.21600f, mInterpolator.mInterpolatedX);
161 assertFloatEquals("t=0.8 y", 2.97600f, mInterpolator.mInterpolatedY);
163 mInterpolator.interpolate(1.0f);
164 assertFloatEquals("t=1.0 x", 2.0f, mInterpolator.mInterpolatedX);
165 assertFloatEquals("t=1.0 y", 3.0f, mInterpolator.mInterpolatedY);
170 mInterpolator.reset(mXCoords, mYCoords, p1, p2 + 1);
171 mInterpolator.setInterval(p1 - 1, p1, p2, p2 + 1);
172 assertEquals("p1x", mXCoords[p1], mInterpolator.mP1X);
173 assertEquals("p1y", mYCoords[p1], mInterpolator.mP1Y);
174 assertEquals("p2x", mXCoords[p2], mInterpolator.mP2X);
175 assertEquals("p2y", mYCoords[p2], mInterpolator.mP2Y);
177 assertFloatEquals("slope x p1", 2.00f, mInterpolator.mSlope1X);
178 assertFloatEquals("slope y p1", 2.00f, mInterpolator.mSlope1Y);
180 assertFloatEquals("slope x p2", 2.00f, mInterpolator.mSlope2X);
181 assertFloatEquals("slope y p2", 2.00f, mInterpolator.mSlope2Y);
183 mInterpolator.interpolate(0.0f);
184 assertFloatEquals("t=0.0 x", 1.0f, mInterpolator.mInterpolatedX);
185 assertFloatEquals("t=0.0 y", 0.0f, mInterpolator.mInterpolatedY);
187 mInterpolator.interpolate(0.2f);
188 assertFloatEquals("t=0.2 x", 1.4f, mInterpolator.mInterpolatedX);
189 assertFloatEquals("t=0.2 y", 0.4f, mInterpolator.mInterpolatedY);
191 mInterpolator.interpolate(0.5f);
192 assertFloatEquals("t=0.5 x", 2.0f, mInterpolator.mInterpolatedX);
193 assertFloatEquals("t=0.5 y", 1.0f, mInterpolator.mInterpolatedY);
195 mInterpolator.interpolate(0.8f);
196 assertFloatEquals("t=0.8 x", 2.6f, mInterpolator.mInterpolatedX);
197 assertFloatEquals("t=0.8 y", 1.6f, mInterpolator.mInterpolatedY);
199 mInterpolator.interpolate(1.0f);
200 assertFloatEquals("t=1.0 x", 3.0f, mInterpolator.mInterpolatedX);
201 assertFloatEquals("t=1.0 y", 2.0f, mInterpolator.mInterpolatedY);