Add font infrastructure
This commit is contained in:
22
Sources/SwiftUIMath/Internal/Helpers/KeyBox.swift
Normal file
22
Sources/SwiftUIMath/Internal/Helpers/KeyBox.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
import Foundation
|
||||
|
||||
final class KeyBox<Value: Hashable>: NSObject {
|
||||
let wrappedValue: Value
|
||||
|
||||
init(_ wrappedValue: Value) {
|
||||
self.wrappedValue = wrappedValue
|
||||
}
|
||||
|
||||
override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(wrappedValue)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? KeyBox<Value> else {
|
||||
return false
|
||||
}
|
||||
return wrappedValue == other.wrappedValue
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
// Derived from SwiftMath by Mike Griebling (MIT License)
|
||||
|
||||
import SwiftUI
|
||||
|
||||
#if canImport(UIKit)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// Derived from SwiftMath by Mike Griebling (MIT License)
|
||||
|
||||
import Foundation
|
||||
|
||||
extension String {
|
||||
|
||||
Reference in New Issue
Block a user