ArcGIS Runtime SDK for iOS: AGSAngularUnit.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSAngularUnit.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2021 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24  //Required for Globals API doc
26 
27 #import <Foundation/Foundation.h>
28 #import <ArcGIS/AGSUnit.h>
29 
30 
31 
36 typedef NS_ENUM(NSInteger, AGSAngularUnitID) {
43 };
44 
51 @interface AGSAngularUnit : AGSUnit
52 
53 #pragma mark -
54 #pragma mark initializers
55 
56 
57 
64 -(nullable instancetype)initWithUnitID:(AGSAngularUnitID)unitID;
65 
72 +(nullable instancetype)unitWithUnitID:(AGSAngularUnitID)unitID;
73 
79 +(nullable instancetype)unitWithWKID:(NSInteger)WKID;
80 
86 +(instancetype)degrees;
87 
93 +(instancetype)radians;
94 
95 #pragma mark -
96 #pragma mark properties
97 
98 @property (nonatomic, assign, readonly) AGSAngularUnitID unitID;
99 
100 #pragma mark -
101 #pragma mark methods
102 
109 -(double)convertToRadians:(double)angle;
110 
117 -(double)convertFromRadians:(double)radians;
118 
126 -(double)convert:(double)angle toUnit:(AGSAngularUnit*)toUnit;
127 
135 -(double)convert:(double)value fromUnit:(AGSAngularUnit*)fromUnit;
136 
137 @end
138 
139 
AGSAngularUnitID
Definition: AGSAngularUnit.h:36
@ AGSAngularUnitIDDegrees
Definition: AGSAngularUnit.h:37
@ AGSAngularUnitIDMinutes
Definition: AGSAngularUnit.h:39
@ AGSAngularUnitIDSeconds
Definition: AGSAngularUnit.h:41
@ AGSAngularUnitIDOther
Definition: AGSAngularUnit.h:42
@ AGSAngularUnitIDGrads
Definition: AGSAngularUnit.h:38
@ AGSAngularUnitIDRadians
Definition: AGSAngularUnit.h:40
Defines an angular unit of measurement.
Definition: AGSAngularUnit.h:52
AGSAngularUnitID unitID
Definition: AGSAngularUnit.h:98
instancetype degrees()
instancetype radians()
Defines a unit of measurement.
Definition: AGSUnit.h:68