mFrame
載入中...
搜尋中...
無符合項目
Float.h
1
8#ifndef MFRAME_55C55E8C_894B_425F_8421_0100EE370D17
9#define MFRAME_55C55E8C_894B_425F_8421_0100EE370D17
10
11/* ***************************************************************************************
12 * Float
13 */
14
15//----------------------------------------------------------------------------------------
16
17//----------------------------------------------------------------------------------------
18#include "./../numb/Number.h"
19
20/* ***************************************************************************************
21 * Namespace
22 */
23namespace mframe::numb {
24 class Float;
25} // namespace mframe::numb
26
27/* ***************************************************************************************
28 * Class Float
29 */
31 /* *************************************************************************************
32 * Variable
33 */
34
35 /* *************************************************************************************
36 * Abstract Method
37 */
38
39 /* *************************************************************************************
40 * Construct Method
41 */
42 public:
47 Float(void);
48
54 Float(float value);
55
60 virtual ~Float(void) override;
61
62 /* *************************************************************************************
63 * Operator Method
64 */
65 public:
71 inline operator float(void) {
72 return this->vValue.f32[0];
73 }
74
82 bool operator==(float v);
83
90 bool operator==(Float& v);
91
98 inline float operator=(float v) {
99 this->vValue.f32[0] = v;
100 return this->vValue.f32[0];
101 }
102
109 inline Float operator+=(float v) {
110 this->vValue.f32[0] += v;
111 return *this;
112 }
113
120 inline Float operator-=(float v) {
121 this->vValue.f32[0] -= v;
122 return *this;
123 }
124
131 inline Float operator*=(float v) {
132 this->vValue.f32[0] *= v;
133 return *this;
134 }
135
142 inline Float operator/=(float v) {
143 this->vValue.f32[0] /= v;
144 return *this;
145 }
146
152 inline Float operator++(int) {
153 Float tmp = *this;
154 ++this->vValue.f32[0];
155 return tmp;
156 }
157
163 inline Float operator++() {
164 ++this->vValue.f32[0];
165 return *this;
166 }
167
173 inline Float operator--(int) {
174 Float tmp = *this;
175 --this->vValue.f32[0];
176 return tmp;
177 }
178
184 inline Float& operator--(void) {
185 --this->vValue.f32[0];
186 return *this;
187 }
188 /* *************************************************************************************
189 * Public Method <Override>
190 */
191
192 /* *************************************************************************************
193 * Public Method
194 */
195
196 /* *************************************************************************************
197 * Protected Method
198 */
199
200 /* *************************************************************************************
201 * Private Method
202 */
203
204 /* *************************************************************************************
205 * Static Variable
206 */
207 public:
208 static const int SIZE;
209 static const float EQUAL_EPSILIN;
210
211 /* *************************************************************************************
212 * Static Method
213 */
214};
215
216/* ***************************************************************************************
217 * End of file
218 */
219
220#endif /* MFRAME_55C55E8C_894B_425F_8421_0100EE370D17 */
Definition Float.h:30
float operator=(float v)
Definition Float.h:98
Float(void)
Construct a new Float object.
Float operator--(int)
Definition Float.h:173
Float(float value)
Construct a new Float object.
bool operator==(Float &v)
Float operator/=(float v)
Definition Float.h:142
Float operator++()
Definition Float.h:163
Float & operator--(void)
Definition Float.h:184
Float operator-=(float v)
Definition Float.h:120
Float operator*=(float v)
Definition Float.h:131
virtual ~Float(void) override
Destroy the Float object.
bool operator==(float v)
Float operator+=(float v)
Definition Float.h:109
Float operator++(int)
Definition Float.h:152
Definition Number.h:30
Definition Boolean.h:23