2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 /// An angle in degrees.<br />
22 /// This reduces ambiguity when using methods which accept angles in degrees or radians.<br />
24 /// <since_tizen> 3 </since_tizen>
25 public class Degree : Disposable
30 /// <since_tizen> 3 </since_tizen>
31 protected bool swigCMemOwn;
33 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
38 /// <since_tizen> 3 </since_tizen>
39 public Degree() : this(Interop.Degree.new_Degree__SWIG_0(), true)
41 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
45 /// Creates an angle in degrees.
47 /// <param name="value">The initial value in degrees.</param>
48 /// <since_tizen> 3 </since_tizen>
49 public Degree(float value) : this(Interop.Degree.new_Degree__SWIG_1(value), true)
51 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 /// Creates an angle in degrees from a radian.
57 /// <param name="value">The initial value in radians.</param>
58 /// <since_tizen> 3 </since_tizen>
59 public Degree(Radian value) : this(Interop.Degree.new_Degree__SWIG_2(Radian.getCPtr(value)), true)
61 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
64 internal Degree(global::System.IntPtr cPtr, bool cMemoryOwn)
66 swigCMemOwn = cMemoryOwn;
67 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
71 /// The value of degree.
73 /// <since_tizen> 3 </since_tizen>
78 Interop.Degree.Degree_degree_set(swigCPtr, value);
79 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83 float ret = Interop.Degree.Degree_degree_get(swigCPtr);
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Degree obj)
91 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
97 /// <since_tizen> 3 </since_tizen>
98 protected override void Dispose(DisposeTypes type)
105 //Release your own unmanaged resources here.
106 //You should not access any managed member here except static instance.
107 //because the execution order of Finalizes is non-deterministic.
109 if (swigCPtr.Handle != global::System.IntPtr.Zero)
114 Interop.Degree.delete_Degree(swigCPtr);
116 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);