.- .
从实部和虚部构造复数。
语法
_Dcomplex _Cbuild( double real, double imaginary );
_Fcomplex _FCbuild( float real, float imaginary );
_Lcomplex _LCbuild( long double real, long double imaginary );
参数
real
要构造的复数的实部。
imaginary
要构造的复数的虚部。
返回值
表示指定浮点类型的值为复数(real
、imaginary
* i)的 _Dcomplex
、_Fcomplex
或 _Lcomplex
结构。
备注
_Cbuild
、_FCbuild
和 _LCbuild
函数简化了复杂类型的创建。 使用 creal
、crealf
、creall
和 cimag
、cimagf
、cimagl
函数以检索所表示复数的实际和虚构部分。
要求
例程 | C 标头 | C++ 标头 |
---|---|---|
.- . | <complex.h> | <ccomplex> |
这些函数是 Microsoft 特定函数。 类型 _Dcomplex
、_Fcomplex
和 _Lcomplex
分别等效于未实现的 C99 本机类型 double _Complex
、float _Complex
和 long double _Complex
。 有关兼容性的详细信息,请参阅 兼容性。
另请参阅
按字母顺序显示的函数参考
.- .
.- .
.- .
.- .
.- .
.- .
.- .
.- .
.- .