From cbd30a29ed6c29145fedd65c1f6b0ee421851b68 Mon Sep 17 00:00:00 2001 From: Roman Gardukevich Date: Fri, 28 Apr 2023 18:32:45 +0300 Subject: [PATCH] Fix point calculation for twoWayOffset due to wrong angle direction --- Sources/Hammer/Utilties/CoreGraphic+Extensions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Hammer/Utilties/CoreGraphic+Extensions.swift b/Sources/Hammer/Utilties/CoreGraphic+Extensions.swift index cf69374..3b1f603 100644 --- a/Sources/Hammer/Utilties/CoreGraphic+Extensions.swift +++ b/Sources/Hammer/Utilties/CoreGraphic+Extensions.swift @@ -33,7 +33,7 @@ extension CGPoint { func twoWayOffset(_ distance: CGFloat, angle radians: CGFloat) -> [CGPoint] { return [ self.offset(distance / 2, angle: radians), - self.offset(distance / 2, angle: .pi - radians), + self.offset(distance / 2, angle: .pi + radians), ] }