Rect and RectF in Android SDK

Iulius Curt picture Iulius Curt · Feb 6, 2011 · Viewed 19.6k times · Source

What is the difference between Rect and RectF in the Android SDK?

Answer

Octavian A. Damiean picture Octavian A. Damiean · Feb 6, 2011

Using Rect you define its edges using integers and using RectF they are defined as floats.

Looking at them more carefully I have spotted a few differences actually. I will only list what one implementation has more compared to the other one.

Rect

RectF

So apparently there are some differences.