[Gambas-user] Simplifying Complex Numbers

Benoît Minisini g4mba5 at gmail.com
Sat Mar 16 16:37:07 CET 2019


Le 16/03/2019 à 15:14, Cedron Dawg a écrit :
> If you are learning about complex numbers, or have students among your friends and family who are, you may find my latest blog article helpful.  So fresh the bits are still wet.
> 
> Titled:  Angle Addition Formulas from Euler's Formula
> 
> https://www.dsprelated.com/showarticle/1238.php
> 
> Near the bottom it features sample Gambas code showing off some of its Complex number capability.
> 
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> 

Cool. Maybe you didn't notice, but instead of writing:

   z1 = New Complex(3, 4)

you can actually write:

   z1 = 3 + 4i

Note that, as 'i' is an identifier, you have to write "1i" to get i.

Regards,

-- 
Benoît Minisini


More information about the User mailing list