File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,12 @@ public struct ${Self} {
92
92
${ Availability ( bits) }
93
93
extension ${ Self} : CustomStringConvertible {
94
94
/// A textual representation of the value.
95
+ ///
96
+ /// For all finite values, the value of this property is a string that can
97
+ /// be converted back to an instance of ${Self} without rounding errors.
98
+ /// That is, if `x` in a `${Self}`, then `${Self}(x.description) == x` is
99
+ /// always true. For any NaN value, the property's value is "nan", and for
100
+ /// positive and negative infinity its value is "inf" and "-inf".
95
101
public var description: String {
96
102
if isNaN {
97
103
return " nan "
@@ -108,6 +114,9 @@ extension ${Self}: CustomStringConvertible {
108
114
${ Availability ( bits) }
109
115
extension ${ Self} : CustomDebugStringConvertible {
110
116
/// A textual representation of the value, suitable for debugging.
117
+ ///
118
+ /// This property has the same value as the `description` propyrty, except
119
+ /// that NaN values are printed in an extended format.
111
120
public var debugDescription: String {
112
121
var ( buffer, length) = _float ${ bits} ToString( self , debug: true )
113
122
return buffer. withBytes { ( bufferPtr) in
You can’t perform that action at this time.
0 commit comments