Prevent implicit conversion warnings

With the warning C flag -Wconversion you'll get compiler warnings about "Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')" without specifying "f"