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 radians.
23 /// <since_tizen> 3 </since_tizen>
24 public class Radian : Disposable
29 /// <since_tizen> 3 </since_tizen>
30 protected bool swigCMemOwn;
32 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
35 /// The default constructor, initializes to 0.
37 /// <since_tizen> 3 </since_tizen>
38 public Radian() : this(Interop.Radian.new_Radian__SWIG_0(), true)
40 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
44 /// Creates an angle in radians.
46 /// <param name="value">The initial value in radians.</param>
47 /// <since_tizen> 3 </since_tizen>
48 public Radian(float value) : this(Interop.Radian.new_Radian__SWIG_1(value), true)
50 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
54 /// Creates an angle in radians from an angle in degrees.
56 /// <param name="degree">The initial value in degrees.</param>
57 /// <since_tizen> 3 </since_tizen>
58 public Radian(Degree degree) : this(Interop.Radian.new_Radian__SWIG_2(Degree.getCPtr(degree)), true)
60 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63 internal Radian(global::System.IntPtr cPtr, bool cMemoryOwn)
65 swigCMemOwn = cMemoryOwn;
66 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
70 /// The value in radians.
72 /// <since_tizen> 3 </since_tizen>
77 Interop.Radian.Radian_radian_set(swigCPtr, value);
78 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82 float ret = Interop.Radian.Radian_radian_get(swigCPtr);
83 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89 /// Conversion to float.
91 /// <returns>The float value of this radian.</returns>
92 /// <since_tizen> 3 </since_tizen>
93 public float ConvertToFloat()
95 float ret = Interop.Radian.Radian_ConvertToFloat(swigCPtr);
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Radian obj)
102 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
108 /// <since_tizen> 3 </since_tizen>
109 protected override void Dispose(DisposeTypes type)
116 //Release your own unmanaged resources here.
117 //You should not access any managed member here except static instance.
118 //because the execution order of Finalizes is non-deterministic.
120 if (swigCPtr.Handle != global::System.IntPtr.Zero)
125 Interop.Radian.delete_Radian(swigCPtr);
127 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);