transition/src/main/java/androidx/transition/RectEvaluator.java
@Override
    public Rect evaluate(float fraction, Rect startValue, Rect endValue) {
        int left = startValue.left + (int) ((endValue.left - startValue.left) * fraction);
        int top = startValue.top + (int) ((endValue.top - startValue.top) * fraction);
        int right = startValue.right + (int) ((endValue.right - startValue.right) * fraction);
        int bottom = startValue.bottom + (int) ((endValue.bottom - startValue.bottom) * fraction);
        if (mRect == null) {
            return new Rect(left, top, right, bottom);
        } else {
            mRect.set(left, top, right, bottom);
            return mRect;
        }
    }
/**
     * This function returns the result of linearly interpolating the start and
     * end Rect values, with <code>fraction</code> representing the proportion
     * between the start and end values. The calculation is a simple parametric
     * calculation on each of the separate components in the Rect objects
     * (left, top, right, and bottom).
     *
     * <p>If {@link #RectEvaluator(android.graphics.Rect)} was used to construct
     * this RectEvaluator, the object returned will be the <code>reuseRect</code>
     * passed into the constructor.</p>
     *
     * @param fraction   The fraction from the starting to the ending values
     * @param startValue The start Rect
     * @param endValue   The end Rect
     * @return A linear interpolation between the start and end values, given the
     * <code>fraction</code> parameter.
     */
This function returns the result of linearly interpolating the start and
end Rect values, with fraction representing the proportion
between the start and end values. The calculation is a simple parametric
calculation on each of the separate components in the Rect objects
(left, top, right, and bottom).

If  #RectEvaluator(android.graphics.Rect) was used to construct
this RectEvaluator, the object returned will be the reuseRect
passed into the constructor.

@param fraction   The fraction from the starting to the ending values
@param startValue The start Rect
@param endValue   The end Rect
@return A linear interpolation between the start and end values, given the
fraction parameter.
This function returns the result of linearly interpolating the start and end Rect values with fraction representing the proportion between the start and end values . The calculation is a simple parametric calculation on each of the separate components in the Rect objects ( left top right and bottom ) . If #RectEvaluator ( android . graphics . Rect ) was used to construct this RectEvaluator the object returned will be the reuseRect passed into the constructor . @param fraction The fraction from the starting to the ending values @param startValue The start Rect @param endValue The end Rect @return A linear interpolation between the start and end values given the fraction parameter .
@Override
    public Rect evaluate(float fraction, Rect startValue, Rect endValue) {
        int left = startValue.left + (int) ((endValue.left - startValue.left) * fraction);
        int top = startValue.top + (int) ((endValue.top - startValue.top) * fraction);
        int right = startValue.right + (int) ((endValue.right - startValue.right) * fraction);
        int bottom = startValue.bottom + (int) ((endValue.bottom - startValue.bottom) * fraction);
        if (mRect == null) {
            return new Rect(left, top, right, bottom);
        } else {
            mRect.set(left, top, right, bottom);
            return mRect;
        }
    }
@ Override public Rect evaluate ( float fraction , Rect startValue , Rect endValue ) { int left = startValue . left + ( int ) ( ( endValue . left - startValue . left ) * fraction ) ; int top = startValue . top + ( int ) ( ( endValue . top - startValue . top ) * fraction ) ; int right = startValue . right + ( int ) ( ( endValue . right - startValue . right ) * fraction ) ; int bottom = startValue . bottom + ( int ) ( ( endValue . bottom - startValue . bottom ) * fraction ) ; if ( mRect == null ) { return new Rect ( left , top , right , bottom ) ; } else { mRect . set ( left , top , right , bottom ) ; return mRect ; } }
This function returns the result of linearly interpolating the start and
 end Rect values, with <code>fraction</code> representing the proportion
 between the start and end values.
This function returns the result of linearly interpolating the start and end Rect values with <code > fraction< / code > representing the proportion between the start and end values .