Why does this method return a float?