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