swift truncate a float code example Example: swift truncate a float let formatted = String(format: "Angle: %.2f", angle)