Use double constants, functions, etc. instead of float since CGFloat is a double on Mac