Skip to content

Commit

Permalink
Merge pull request #116 from z3bi/master
Browse files Browse the repository at this point in the history
Silencing warnings by changing M_PI to .pi
  • Loading branch information
Hugo Tunius authored Mar 28, 2017
2 parents da15ac5 + 7288a93 commit 7ebbd3d
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 7ebbd3d

Please sign in to comment.