resolve warnings about float vs CGFLoat