Is it possible to change a setting, property, etc in Swift for iOS so that it assumes degrees for trigonometry calculations rather than radians?
For example si
There's no setting or property to change the built-in trigonometric functions. You should just work strictly in radians if you want to simplify your expressions, or define your own sindeg
, cosdeg
, etc.
Each of the floating-point types has a built-in static
member named pi
whose value is the best approximation to π. For example: Double.pi
, Float.pi
, CGFloat.pi
.
Also, sin 90˚ is 1, not 0.