Lines Matching refs:fraction

35  * {@link ParallaxEffect#performMapping(Parallax)} which computes a fraction between 0 and 1
37 * on, the fraction increases from 0 at beginning to 1 at the end. Then the fraction is passed on
209 float fraction = 0;
221 fraction = calculateFraction(source);
223 target.update(fraction);
229 * This method is expected to compute a fraction between 0 and 1 based on the current values of
230 * variables in {@link Parallax}. As the parallax effect goes on, the fraction increases
247 * fraction inside a range to fraction of whole range.
249 * When markerValueIndex is 3, the fraction is inside last range.
250 * adjusted_fraction = 8 / 10 + 2 / 10 * fraction.
252 final float getFractionWithWeightAdjusted(float fraction, int markerValueIndex) {
259 fraction = fraction * mWeights.get(markerValueIndex - 1) / allWeights;
261 fraction += mTotalWeights.get(markerValueIndex - 2) / allWeights;
266 fraction = fraction / allWeights;
268 fraction += (float) (markerValueIndex - 1) / allWeights;
272 return fraction;
321 float fraction;
335 fraction = (float) (lastMarkerValue - lastValue)
337 return getFractionWithWeightAdjusted(fraction, i);
342 // fraction moves from 0 to 1.
343 fraction = (float) (lastMarkerValue - currentValue)
350 fraction = (float) (lastMarkerValue - currentValue)
356 fraction = 1f - (float) (currentValue - markerValue)
359 return getFractionWithWeightAdjusted(fraction, i);
415 float fraction;
429 fraction = (float) (lastMarkerValue - lastValue)
431 return getFractionWithWeightAdjusted(fraction, i);
436 // fraction moves from 0 to 1.
437 fraction = (float) (lastMarkerValue - currentValue)
444 fraction = (float) (lastMarkerValue - currentValue)
450 fraction = 1f - (float) (currentValue - markerValue)
453 return getFractionWithWeightAdjusted(fraction, i);