[英]Angle to Double or CGFloat or String - SwiftUI
In swift Angle(degrees: 20.0), So now I want to convert or store that 20.0 in a Double or String or CGFloat.在 swift Angle(degrees: 20.0) 中,所以现在我想将 20.0 转换或存储在 Double 或 String 或 CGFloat 中。
What is the process?流程是什么?
Instances of type Angle
have degrees
property of type Double
. Angle
类型的实例具有Double
类型的degrees
属性。 See the documentation .请参阅文档。
let angle = Angle(degrees: 20)
let degrees = angle.degrees // 20 of type Double
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.