CLLocationDegrees initialization

橙三吉。 提交于 2019-11-29 12:37:46

问题


How do you make a CLLocationDegrees? It's not a float, so what is it?


回答1:


According to the CLLocation documentation, CLLocationDegrees is simply a double. So to create one, you could do something as simple as this:

CLLocationDegrees degrees = 45;



回答2:


CLLocationDegrees are typedefed doubles: http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CLLocation_Class/CLLocation/CLLocation.html#//apple_ref/doc/uid/TP40007126-CH3-SW19

ex: CLLocationDegrees myDegrees = 2.313224;



来源:https://stackoverflow.com/questions/2497137/cllocationdegrees-initialization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!