diff options
Diffstat (limited to 'DiscoBot/imaginary.cs')
-rw-r--r-- | DiscoBot/imaginary.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/DiscoBot/imaginary.cs b/DiscoBot/imaginary.cs new file mode 100644 index 0000000..9855dc2 --- /dev/null +++ b/DiscoBot/imaginary.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiscoBot +{ + public class imaginary + { + public double re; + public double im; + + public imaginary(imaginary i) + { + this.re = i.re; + this.im = i.im; + } + public imaginary(double r, double i) + { + this.re = r; + this.im = i; + } + + + public void step(imaginary c) + { + double temp = re; + re = (re * re) - (im * im) + c.re; + im = (2.0 * temp * im + c.im); + } + } +} |