Changed use of float constructors to valueOf

To follow Eclipse's advice.