Skip to content

Commit 1e5ab2b

Browse files
authored
Merge pull request #279 from ismyhc/Fix-M_PI_2-and-M_PI-deprecations
Fixed M_PI_2 and M_PI deprecation warnings for XCode 8.3
2 parents 1f3998d + 7ba95a0 commit 1e5ab2b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Source/Helper.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ struct Helper {
66
static func rotationTransform() -> CGAffineTransform {
77
switch UIDevice.current.orientation {
88
case .landscapeLeft:
9-
return CGAffineTransform(rotationAngle: CGFloat(M_PI_2))
9+
return CGAffineTransform(rotationAngle: CGFloat.pi * 0.5)
1010
case .landscapeRight:
11-
return CGAffineTransform(rotationAngle: CGFloat(-M_PI_2))
11+
return CGAffineTransform(rotationAngle: -(CGFloat.pi * 0.5))
1212
case .portraitUpsideDown:
13-
return CGAffineTransform(rotationAngle: CGFloat(M_PI))
13+
return CGAffineTransform(rotationAngle: CGFloat.pi)
1414
default:
1515
return CGAffineTransform.identity
1616
}

0 commit comments

Comments
 (0)