I don't see why you changed this to `float`; if anything more casting it required.