Skip to content

Commit 1aab931

Browse files
committed
Changes to support Swift 4.2
1 parent 271b201 commit 1aab931

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/CATempo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class CATempo : Tempo {
4747
public override init() {
4848
super.init()
4949
displayLink = CADisplayLink.init(target: self, selector: #selector(update))
50-
displayLink?.add(to: RunLoop.main, forMode: RunLoopMode(rawValue: RunLoopMode.commonModes.rawValue))
50+
displayLink?.add(to: RunLoop.main, forMode: RunLoop.Mode(rawValue: RunLoop.Mode.common.rawValue))
5151
}
5252

5353
deinit {

Sources/MotionMachine.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@ func ≈≈ (a: Float, b: Float) -> Bool {
553553
return true
554554
}
555555

556-
let fabs_a = fabs(a)
557-
let fabs_b = fabs(b)
558-
let diff = fabs(fabs_a - fabs_b)
556+
let fabs_a = abs(a)
557+
let fabs_b = abs(b)
558+
let diff = abs(fabs_a - fabs_b)
559559

560560
if (a == 0.0 || b == 0.0 || diff < Float.leastNormalMagnitude) {
561561
// a or b is zero or both are extremely close to it

0 commit comments

Comments
 (0)