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

Class tkmath.Complexf


Synopsis: This class represents a single precision complex number.

  Base classes:
  Methods:

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

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

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

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

 
→ top of page
Method getAbsSqr
Returns squared length of complex number (faster than abs)
Signature
getAbsSqr():float
Returns
float–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():float
Returns
float–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():float
Returns
float–x property

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

 
→ top of page
Method init
Set value of instance to x=a and y=b (x+iy)
Signature
init(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(floata,
  floatb 
  )  
Arguments
floata–new r value
floatb–new 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(Complexfv)
Arguments
Complexfv–complex value to multiply

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

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

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

 
→ top of page
Method NewPolar
Returns new instance with values r=va and a=vb of (reia)
Signature
NewPolar(floatva,
  floatvb 
  )  
 :Complexf
Arguments
floatva–new r value
floatvb–new a value
Returns
Complexf–new instance of Complexf (reia)

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

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

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

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

 
→ top of page
Method sub
substract complex number v from this instance
Signature
sub(Complexfv)
Arguments
Complexfv–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(floats)
Arguments
floats–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