Skip to content

Commit 6c29d2f

Browse files
authored
Fix the doc formatting for FloatingPoint comparison methods (swiftlang#78443)
In the documentation for the `isLess(than:)` and `isLessThanOrEqualTo(_:)` methods, a code sample isn't being formatted correctly due to it directly following an unordered list. This change adds an additional message that introduces the code sample, separating it from the list and allowing the correct formatting to be applied.
1 parent 76fb3c5 commit 6c29d2f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/public/core/FloatingPoint.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,9 @@ public protocol FloatingPoint: SignedNumeric, Strideable, Hashable
10481048
/// - Every value except for NaN and `+infinity` compares less than
10491049
/// `+infinity`.
10501050
///
1051+
/// The following example shows the behavior of the `isLess(than:)` method
1052+
/// with different kinds of values:
1053+
///
10511054
/// let x = 15.0
10521055
/// x.isLess(than: 20.0)
10531056
/// // true
@@ -1078,6 +1081,9 @@ public protocol FloatingPoint: SignedNumeric, Strideable, Hashable
10781081
/// - `-infinity` compares less than or equal to all values except NaN.
10791082
/// - Every value except NaN compares less than or equal to `+infinity`.
10801083
///
1084+
/// The following example shows the behavior of the `isLessThanOrEqualTo(_:)`
1085+
/// method with different kinds of values:
1086+
///
10811087
/// let x = 15.0
10821088
/// x.isLessThanOrEqualTo(20.0)
10831089
/// // true

0 commit comments

Comments
 (0)