Originally posted by Conrad McLaughlin:
222: incompatible types
found : double
required: java.lang.Float
VL = Math.sqrt(VL); //Square root
Can't you square root a number if it is a float?
(VL is declared as a float.)
Sure you can. What the compiler is complaining about is assigning a double to a float, so cast it:
VL = (float) Math.sqrt(VL);