Is this possible in VB?
I know how to work with complex numbers (adding, subtraction, division, multiply) in borland c++, but in vb?
Printable View
Is this possible in VB?
I know how to work with complex numbers (adding, subtraction, division, multiply) in borland c++, but in vb?
You have to represent complex numbers with a UDT like
Then you have to do all the math in functions that you write yourself.Code:Type Complex
r as Single
imag as Single
End Type
Dim Im as Complex
Code:Function ComplexAdd(a as Complex,b as Complex) as Complex
Dim tmp as Complex
tmp.r = a.r + b.r
tmp.imag = a.imag + b.imag
ComplexAdd = tmp
End Function
thnx men, it look alot like C++. I thought it was more difficult then that! :p