fixed float/CGFloat incompatibility

this one caused a crash when compiled with Xcode 6