c# - float doesn't register -


this question has answer here:

example:

output when debugging: bvar= 0.0 

what missing?

you dividing integers, not floats.

use float bvarianza = (499f/ 500f); instead.

your expression evaluated

float x = (float) (int / int).

after integers have been divided (which results in 0 because integers don't have fractal part) result stored in variable of type float, adds .0 fractal part.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -