From 21a2b2a7d2e7daa9a43eff518b05ac46e9ad3d19 Mon Sep 17 00:00:00 2001 From: Michael Knoch Date: Wed, 7 Aug 2024 20:05:25 +0200 Subject: [PATCH] cleanup API --- Sources/AffineTransform.swift | 6 +++--- Sources/CGAffineTransform.swift | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Sources/AffineTransform.swift b/Sources/AffineTransform.swift index debcf7bb..ea157908 100644 --- a/Sources/AffineTransform.swift +++ b/Sources/AffineTransform.swift @@ -110,7 +110,7 @@ extension AffineTransform { /// [ -sin α cos α 0 ] /// [ 0 0 1 ] /// ``` - public init(rotationByRadians angle: CGFloat) { + public init(rotationAngle angle: CGFloat) { let sinα = sin(angle) let cosα = cos(angle) @@ -131,7 +131,7 @@ extension AffineTransform { /// ``` public init(rotationByDegrees angle: CGFloat) { let α = angle * .pi / 180 - self.init(rotationByRadians: α) + self.init(rotationAngle: α) } } @@ -207,7 +207,7 @@ extension AffineTransform { /// ``` public mutating func rotate(byRadians angle: CGFloat) { self = concatenated( - AffineTransform(rotationByRadians: angle) + AffineTransform(rotationAngle: angle) ) } diff --git a/Sources/CGAffineTransform.swift b/Sources/CGAffineTransform.swift index 4db65189..f6853ee8 100644 --- a/Sources/CGAffineTransform.swift +++ b/Sources/CGAffineTransform.swift @@ -13,10 +13,6 @@ public extension CGAffineTransform { self.init(scaleByX: scaleX, byY: y) } - init(rotationAngle: CGFloat) { - self.init(rotationByRadians: rotationAngle) - } - var isIdentity: Bool { return self == .identity }