Skip to content

Commit

Permalink
remove usage of deprecated function fabs
Browse files Browse the repository at this point in the history
  • Loading branch information
hfutrell committed Feb 15, 2019
1 parent 65c93ea commit 257de50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BezierKit/BezierKitTests/ArcApproximateableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ArcApproximateableTests: XCTestCase {
let t2: CGFloat = 0.75
let d1: CGFloat = distance(a.origin, subCurve.compute(t1))
let d2: CGFloat = distance(a.origin, subCurve.compute(t2))
let error = fabs(a.radius - d1) + fabs(a.radius - d2)
let error = abs(a.radius - d1) + abs(a.radius - d2)
if error > errorThreshold {
return false
}
Expand Down
2 changes: 1 addition & 1 deletion BezierKit/Library/ArcApproximateable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension ArcApproximateable {
let ref = Utils.dist(pc, np1)
let d1 = Utils.dist(pc, c1)
let d2 = Utils.dist(pc, c2)
return fabs(d1-ref) + fabs(d2-ref)
return abs(d1-ref) + abs(d2-ref)
}

repeat {
Expand Down

0 comments on commit 257de50

Please sign in to comment.