diff options
author | Dennis Kobert <d-kobert@web.de> | 2017-08-22 14:14:39 +0200 |
---|---|---|
committer | Dennis Kobert <d-kobert@web.de> | 2017-08-22 14:14:39 +0200 |
commit | 90285f40e5a5a51bc51cb972963f56f630bc2792 (patch) | |
tree | f3344de1d088e5d203f67846ea8fdefecab28142 /DiscoBot/imaginary.cs | |
parent | abdb151ab34d1d5356dea59ceebb97072fd83920 (diff) |
Initial push
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); + } + } +} |