File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
//
2
- // StdLib+NYPLAdditions.swift
3
- // Simplified
4
- //
5
2
// 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 .
7
4
//
8
5
9
6
import Foundation
10
7
11
8
infix operator =~= : ComparisonPrecedence
12
9
13
- public extension Float {
10
+ public extension Double {
14
11
15
12
/// Performs equality check minus an epsilon
16
13
/// - Returns: `true` if the numbers differ by less than the epsilon,
17
14
/// `false` otherwise.
18
- static func =~= ( a: Float , b: Float ? ) -> Bool {
15
+ static func =~= ( a: Double , b: Double ? ) -> Bool {
19
16
guard let b = b else {
20
17
return false
21
18
}
22
19
23
- return abs ( a - b) < Float . ulpOfOne
20
+ return abs ( a - b) < Double . ulpOfOne
24
21
}
25
22
26
23
func roundTo( decimalPlaces: Int ) -> String {
You can’t perform that action at this time.
0 commit comments