ReactOS 0.4.16-dev-197-g92996da
complex< float > Struct Reference

#include <_complex.h>

Public Types

typedef float value_type
 
typedef complex< float_Self
 

Public Member Functions

 complex (value_type __x=0.0f, value_type __y=0.0f)
 
 complex (const complex< float > &__z)
 
 complex (const complex< double > &__z)
 
 complex (const complex< long double > &__z)
 
value_type real () const
 
value_type imag () const
 
_Selfoperator= (value_type __x)
 
_Selfoperator+= (value_type __x)
 
_Selfoperator-= (value_type __x)
 
_Selfoperator*= (value_type __x)
 
_Selfoperator/= (value_type __x)
 
_Selfoperator= (const _Self &__z)
 
_Selfoperator+= (const _Self &__z)
 
_Selfoperator-= (const _Self &__z)
 
_Selfoperator*= (const _Self &__z)
 
_Selfoperator/= (const _Self &__z)
 

Static Public Member Functions

static void _STLP_CALL _div (const float &__z1_r, const float &__z1_i, const float &__z2_r, const float &__z2_i, float &__res_r, float &__res_i)
 
static void _STLP_CALL _div (const float &__z1_r, const float &__z2_r, const float &__z2_i, float &__res_r, float &__res_i)
 

Public Attributes

value_type _M_re
 
value_type _M_im
 

Detailed Description

Definition at line 180 of file _complex.h.

Member Typedef Documentation

◆ _Self

typedef complex<float> complex< float >::_Self

Definition at line 182 of file _complex.h.

◆ value_type

typedef float complex< float >::value_type

Definition at line 181 of file _complex.h.

Constructor & Destructor Documentation

◆ complex() [1/4]

complex< float >::complex ( value_type  __x = 0.0f,
value_type  __y = 0.0f 
)
inline

Definition at line 185 of file _complex.h.

186 : _M_re(__x), _M_im(__y) {}
value_type _M_im
Definition: _complex.h:314
value_type _M_re
Definition: _complex.h:313

◆ complex() [2/4]

complex< float >::complex ( const complex< float > &  __z)
inline

Definition at line 188 of file _complex.h.

188: _M_re(__z._M_re), _M_im(__z._M_im) {}

◆ complex() [3/4]

complex< float >::complex ( const complex< double > &  __z)
inlineexplicit

Definition at line 600 of file _complex.h.

601 : _M_re((float)__z._M_re), _M_im((float)__z._M_im) {}
value_type _M_im
Definition: _complex.h:452
value_type _M_re
Definition: _complex.h:451

◆ complex() [4/4]

complex< float >::complex ( const complex< long double > &  __z)
inlineexplicit

Definition at line 605 of file _complex.h.

606 : _M_re((float)__z._M_re), _M_im((float)__z._M_im) {}

Member Function Documentation

◆ _div() [1/2]

void _STLP_CALL complex< float >::_div ( const float __z1_r,
const float __z1_i,
const float __z2_r,
const float __z2_i,
float __res_r,
float __res_i 
)
static

Definition at line 126 of file complex.cpp.

129{ _divT(__z1_r, __z1_i, __z2_r, __z2_i, __res_r, __res_i); }
static void _divT(const _Tp &__z1_r, const _Tp &__z1_i, const _Tp &__z2_r, const _Tp &__z2_i, _Tp &__res_r, _Tp &__res_i)
Definition: complex.cpp:84

◆ _div() [2/2]

void _STLP_CALL complex< float >::_div ( const float __z1_r,
const float __z2_r,
const float __z2_i,
float __res_r,
float __res_i 
)
static

Definition at line 132 of file complex.cpp.

135{ _divT(__z1_r, __z2_r, __z2_i, __res_r, __res_i); }

◆ imag()

value_type complex< float >::imag ( ) const
inline

Definition at line 196 of file _complex.h.

196{ return _M_im; }

◆ operator*=() [1/2]

_Self & complex< float >::operator*= ( const _Self __z)
inline

Definition at line 295 of file _complex.h.

295 {
296 value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
297 value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
298 _M_re = __r;
299 _M_im = __i;
300 return *this;
301 }
float value_type
Definition: _complex.h:181

◆ operator*=() [2/2]

_Self & complex< float >::operator*= ( value_type  __x)
inline

Definition at line 213 of file _complex.h.

213 {
214 _M_re *= __x;
215 _M_im *= __x;
216 return *this;
217 }

◆ operator+=() [1/2]

_Self & complex< float >::operator+= ( const _Self __z)
inline

Definition at line 283 of file _complex.h.

283 {
284 _M_re += __z._M_re;
285 _M_im += __z._M_im;
286 return *this;
287 }

◆ operator+=() [2/2]

_Self & complex< float >::operator+= ( value_type  __x)
inline

Definition at line 205 of file _complex.h.

205 {
206 _M_re += __x;
207 return *this;
208 }

◆ operator-=() [1/2]

_Self & complex< float >::operator-= ( const _Self __z)
inline

Definition at line 289 of file _complex.h.

289 {
290 _M_re -= __z._M_re;
291 _M_im -= __z._M_im;
292 return *this;
293 }

◆ operator-=() [2/2]

_Self & complex< float >::operator-= ( value_type  __x)
inline

Definition at line 209 of file _complex.h.

209 {
210 _M_re -= __x;
211 return *this;
212 }

◆ operator/=() [1/2]

_Self & complex< float >::operator/= ( const _Self __z)
inline

Definition at line 303 of file _complex.h.

303 {
304 value_type __r;
305 value_type __i;
306 _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
307 _M_re = __r;
308 _M_im = __i;
309 return *this;
310 }
static void _STLP_CALL _div(const float &__z1_r, const float &__z1_i, const float &__z2_r, const float &__z2_i, float &__res_r, float &__res_i)
Definition: complex.cpp:126

◆ operator/=() [2/2]

_Self & complex< float >::operator/= ( value_type  __x)
inline

Definition at line 218 of file _complex.h.

218 {
219 _M_re /= __x;
220 _M_im /= __x;
221 return *this;
222 }

◆ operator=() [1/2]

_Self & complex< float >::operator= ( const _Self __z)
inline

Definition at line 277 of file _complex.h.

277 {
278 _M_re = __z._M_re;
279 _M_im = __z._M_im;
280 return *this;
281 }

◆ operator=() [2/2]

_Self & complex< float >::operator= ( value_type  __x)
inline

Definition at line 200 of file _complex.h.

200 {
201 _M_re = __x;
202 _M_im = 0.0f;
203 return *this;
204 }

◆ real()

value_type complex< float >::real ( ) const
inline

Definition at line 195 of file _complex.h.

195{ return _M_re; }

Member Data Documentation

◆ _M_im

Definition at line 314 of file _complex.h.

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and operator=().

◆ _M_re

Definition at line 313 of file _complex.h.

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and operator=().


The documentation for this struct was generated from the following files: