Convert Rect to RectF

What is the best way to convert a Rect variable to RectF? I can’t leave him.

RectF rect = (RectF) currentRect; //produces an error 
+8
android android-canvas rectangles
source share
1 answer
 RectF rect = new RectF(currentRect); 
+16
source share

All Articles