Created
February 27, 2016 20:54
-
-
Save jackd942/2d57ae35c6f34003a862 to your computer and use it in GitHub Desktop.
Extension to CGFloat for use in Devslopes App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CGFloatExt.swift | |
// devslopes-app | |
// | |
// Created by Jack Davis on 2/21/16. | |
// Copyright © 2016 Devslopes. All rights reserved. | |
// | |
import UIKit | |
extension CGFloat { | |
func radians() -> CGFloat { | |
let b = CGFloat(M_PI) * (self/180) | |
return b | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment