→ index of namespace default
 
→ index of project tkmath
 
→ index of module tkmath

Class tkmath.Complexd


Synopsis: This class represents a double precision complex number.

  Base classes:
  Methods:

Method add
add complex number v to this instance
Signature
add(Complexdv)
Arguments
Complexdv–complex value to add

 
→ top of page
Method div
Divide this instance by complex v
Signature
div(Complexdv)
Arguments
Complexdv–complex value to divide through

 
→ top of page
Method getA
Get a property of reia
Signature
getA():Double
Returns
Double–

 
→ top of page
Method getAbs
Returns length of complex number
Signature
getAbs():Double
Returns
Double–length

 
→ top of page
Method getAbsSqr
Returns squared length of complex number (faster than abs)
Signature
getAbsSqr():Double
Returns
Double–length2

 
→ top of page
Method getPolarString
Get string representation of complex number (reia)
Signature
getPolarString():String
Returns
String–

 
→ top of page
Method getR
Get r property of reia
Signature
getR():Double
Returns
Double–r property

 
→ top of page
Method getString
Get string representation of complex number (x+iy)
Signature
getString():String
Returns
String–string representation (x+iy)

 
→ top of page
Method getX
Get x property of x+iy
Signature
getX():Double
Returns
Double–x property

 
→ top of page
Method getY
Get y property of x+iy
Signature
getY():Double
Returns
Double–y property

 
→ top of page
Method init
Set value of instance to x=a and y=b (x+iy)
Signature
init(Doublea,
  Doubleb 
  )  
Arguments
Doublea–new x value
Doubleb–new y value

 
→ top of page
Method initf
Set value of instance to single precision x=a and y=b (x+iy)
Signature
initf(floata,
  floatb 
  )  
Arguments
floata–new x value
floatb–new y value

 
→ top of page
Method initPolar
Set value of instance to r=_a and a=_b (reia)
Signature
initPolar(Doublea,
  Doubleb 
  )  
Arguments
Doublea–new r value
Doubleb–new a value

 
→ top of page
Method initPolarf
Set value of instance to r=_a and a=_b (reia)
Signature
initPolarf(sF32a,
  sF32b 
  )  
Arguments
sF32a–new single precision r value
sF32b–new single precision a value

 
→ top of page
Method invert
Invert this instance (v=1/v)
Signature
invert()

 
→ top of page
Method mul
Multiply this instance with complex v
Signature
mul(Complexdv)
Arguments
Complexdv–complex value to multiply

 
→ top of page
Method mulConj
Multiply this instance with complex conjugated v, ((x1+iy1)*(x2-iy2))
Signature
mulConj(Complexdv)
 :float
Arguments
Complexdv–complex value to conjugate and multiply
Returns
float–result of complex conjugated multiplication (scalar value)

 
→ top of page
Method muld
Multiply this instance with scalar v
Signature
muld(Doublev)
Arguments
Doublev–scalar value to multiply

 
→ top of page
Method New
Returns new instance with values x=a and y=b of (x+iy)
Signature
New(Doublea,
  Doubleb 
  )  
 :Complexd
Arguments
Doublea–new x value
Doubleb–new y value
Returns
Complexd–new instance of Complexd (x+iy)

 
→ top of page
Method NewPolar
Returns new instance with values r=va anda a=vb of (reia)
Signature
NewPolar(Doubleva,
  Doublevb 
  )  
 :Complexd
Arguments
Doubleva–new r value
Doublevb–new a value
Returns
Complexd–new instance of Complexd (reia)

 
→ top of page
Method setA
Set a property of reia
Signature
setA(Doublea)
Arguments
Doublea–new a value

 
→ top of page
Method setR
Set r property of reia
Signature
setR(Doubler)
Arguments
Doubler–new r value

 
→ top of page
Method setX
Set x property of x+iy
Signature
setX(Doublex)
Arguments
Doublex–new x value

 
→ top of page
Method setY
Set y property of x+iy
Signature
setY(Doublex)
Arguments
Doublex–

 
→ top of page
Method sub
substract complex number v from this instance
Signature
sub(Complexdv)
Arguments
Complexdv–complex value to substract

 
→ top of page
Method unit
Set length of instance to 1
Signature
unit()

 
→ top of page
Method unitScale
Set length of instance to s
Signature
unitScale(Doubles)
Arguments
Doubles–new length for complex number

 
→ top of page
 

Project Modules:tkmath 
Project Classes:Complexd , Complexf , Math , Matrix , Matrix2d , Matrix2f , Matrix2x3f , Matrix3d , Matrix3f , Matrix4d , Matrix4f , Quaterniond , Quaternionf , Vector2d , Vector2f , Vector3d , Vector3f , Vector4d , Vector4f 
Project Functions:absd , absf , acoscd , acoscf , acosd , acosf , acoshcd , acoshcf , acoshd , acoshf , asincd , asincf , asind , asinf , asinhcd , asinhcf , asinhd , asinhf , atan2d , atan2f , atancd , atancf , atand , atanf , atanhcd , atanhcf , atanhd , atanhf , ceild , ceilf , complexd , complexf , complexfPolar , complexfPolar , coscd , coscf , cosd , cosf , coshcd , coshcf , coshd , coshf , exp10d , exp10f , exp2d , exp2f , expcd , expcf , expd , expf , f16_from_f32 , f32_from_f16 , floord , floorf , fx16_from_f16 , hypotd , hypotf , log10d , log10f , log2d , log2f , logcd , logcf , logd , logf , matrix2d , matrix2f , matrix2x3f , matrix3d , matrix3f , matrix4d , matrix4f , modd , modf , powcd , powcf , powd , powf , quaterniond , quaternionf , relCmpd , relCmpf , relErrCmpd , relErrCmpf , roundd , roundf , sincd , sincf , sind , sinf , sinhcd , sinhcf , sinhd , sinhf , sqrtcd , sqrtcf , sqrtd , sqrtf , tancf , tancf , tand , tanf , tanhcd , tanhcf , tanhd , tanhf , vector2d , vector2f , vector3d , vector3f , vector4d , vector4f 
All Namespaces:default , graph , ui 
All Projects:core , eqxmms , ShaderVG , ShaderVG_Text , tkanalogrytm , tkchipmunk , tkclap , tkfileutils , tkfreeglut , tkfreetype2 , tkfreeverb , tkmath , tkmidi , tkmidipipe , tkminnie , tkoldmath , tkopengl , tkportaudio , tkradiastools , tksamplechain , tksampleedit , tksampler , tksdl , tksdl_net , tksidplay2 , tkspeexdsp , tksqlite , tktriangulate , tkui , tkvst2 , tkzip , ui , yingtest 


auto-generated by "DOG", the TkScript document generator. Tue, 3/Mar/2026 18:10:18