File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 11//
2- // StdLib+NYPLAdditions.swift
3- // Simplified
4- //
52// Created by Ettore Pasquini on 6/17/20.
6- // Copyright © 2020 NYPL . All rights reserved .
3+ // Copyright © 2024 The New York Public Library . All Rights Reserved .
74//
85
96import Foundation
107
118infix operator =~= : ComparisonPrecedence
129
13- public extension Float {
10+ public extension Double {
1411
1512 /// Performs equality check minus an epsilon
1613 /// - Returns: `true` if the numbers differ by less than the epsilon,
1714 /// `false` otherwise.
18- static func =~= ( a: Float , b: Float ? ) -> Bool {
15+ static func =~= ( a: Double , b: Double ? ) -> Bool {
1916 guard let b = b else {
2017 return false
2118 }
2219
23- return abs ( a - b) < Float . ulpOfOne
20+ return abs ( a - b) < Double . ulpOfOne
2421 }
2522
2623 func roundTo( decimalPlaces: Int ) -> String {
You can’t perform that action at this time.
0 commit comments