Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method FloatMath.sqrt() is deprecated [duplicate]

I updated my android studio to 2.1.2 and opened previous project.Now it shows that FloatMath.sqrt() is deprecated and cannot resolve method 'sqrt(float)'

like image 778
Singh Avatar asked Aug 02 '16 07:08

Singh


1 Answers

Just type cast it with float as -

(float)Math.sqrt(...)

FloatMath is deprecated in API 22

Reference link - https://developer.android.com/reference/android/util/FloatMath.html

like image 91
Onkar Nene Avatar answered Nov 16 '22 08:11

Onkar Nene