Skip to content

Commit

Permalink
Silencing warnings by changing M_PI to .pi
Browse files Browse the repository at this point in the history
  • Loading branch information
z3bi committed Mar 27, 2017
1 parent da15ac5 commit 7288a93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class SkyFloatingLabelTextFieldWithIconTests: XCTestCase {
floatingLabelTextFieldWithIcon.iconRotationDegrees = 45

// then
let expectedTransform = CGAffineTransform(rotationAngle: CGFloat(45.0 * M_PI / 180.0))
let expectedTransform = CGAffineTransform(rotationAngle: CGFloat(45.0 * .pi / 180.0))
XCTAssertEqual(floatingLabelTextFieldWithIcon.iconLabel.transform.a, expectedTransform.a)
XCTAssertEqual(floatingLabelTextFieldWithIcon.iconLabel.transform.b, expectedTransform.b)
XCTAssertEqual(floatingLabelTextFieldWithIcon.iconLabel.transform.c, expectedTransform.c)
Expand Down
2 changes: 1 addition & 1 deletion Sources/SkyFloatingLabelTextFieldWithIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ open class SkyFloatingLabelTextFieldWithIcon: SkyFloatingLabelTextField {
@IBInspectable
open var iconRotationDegrees:Double = 0 {
didSet {
self.iconLabel.transform = CGAffineTransform(rotationAngle: CGFloat(iconRotationDegrees * M_PI / 180.0))
self.iconLabel.transform = CGAffineTransform(rotationAngle: CGFloat(iconRotationDegrees * .pi / 180.0))
}
}

Expand Down

0 comments on commit 7288a93

Please sign in to comment.