Someone explain converting "type float to bool"?

During my time scripting a very basic car controller, it seems the most common error I get is

Cannot implicitly convert type `float’ to ‘bool’

I kind of understand what the problem is when this occurs but I’m not quite there in understanding what you have to do whenever it happens. Basically, is it the difference between “=” and “==”? Such as when you are making an if statement, saying

if(currentSpeed = 0){
     Power = 300;
}

Would be wrong because you are assigning currentSpeed 0 instead of checking if it IS 0, which would be ==…?

“=” is an operator used to assign the right value to the left variable.

“==” is for making a comparison to check if the values on both sides are equal.

If you’re trying to compare floats, you may need to use a threshold value since you can’t always guarantee that floats will be the same due to imprecision.

http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm