Skip to content

Bugfix: argument label of isTotallyOrdered. #3683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/public/SDK/Foundation/Decimal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ extension Decimal {
return order == .orderedAscending || order == .orderedSame
}

public func isTotallyOrdered(below other: Decimal) -> Bool {
public func isTotallyOrdered(belowOrEqualTo other: Decimal) -> Bool {
// Notes: Decimal does not have -0 or infinities to worry about
if self.isNaN {
return false
Expand Down
8 changes: 4 additions & 4 deletions stdlib/public/core/FloatingPoint.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public protocol FloatingPoint: Comparable, Arithmetic,
/// values of type `Self`, including non-canonical encodings, signed zeros,
/// and NaNs. Because it is used much less frequently than the usual
/// comparisons, there is no operator form of this relation.
func isTotallyOrdered(below other: Self) -> Bool
func isTotallyOrdered(belowOrEqualTo other: Self) -> Bool

/// True if and only if `self` is normal.
///
Expand Down Expand Up @@ -708,7 +708,7 @@ public protocol BinaryFloatingPoint: FloatingPoint, ExpressibleByFloatLiteral {

func isLessThanOrEqualTo<Other: BinaryFloatingPoint>(other: Other) -> Bool

func isTotallyOrdered<Other: BinaryFloatingPoint>(below other: Other) -> Bool
func isTotallyOrdered<Other: BinaryFloatingPoint>(belowOrEqualTo other: Other) -> Bool
*/
}

Expand Down Expand Up @@ -852,7 +852,7 @@ extension BinaryFloatingPoint {
significandBitPattern: magnitudeOf.significandBitPattern)
}

public func isTotallyOrdered(below other: Self) -> Bool {
public func isTotallyOrdered(belowOrEqualTo other: Self) -> Bool {
// Quick return when possible.
if self < other { return true }
if other > self { return false }
Expand Down Expand Up @@ -909,7 +909,7 @@ extension BinaryFloatingPoint {
return Other(self).isLessThanOrEqualTo(other)
}

public func isTotallyOrdered<Other: BinaryFloatingPoint>(before other: Other) -> Bool {
public func isTotallyOrdered<Other: BinaryFloatingPoint>(belowOrEqualTo other: Other) -> Bool {
if Self.significandBitCount >= Other.significandBitCount {
return self.totalOrder(with: Self(other))
}
Expand Down