Use swift native type Float instead of CGFloat