(x, y, timeStep = 0)
| 37 | # ----------------------------------------------------------------------------- |
| 38 | |
| 39 | def mandelbrotTest(x, y, timeStep = 0): |
| 40 | count = 0; |
| 41 | cReal = float(x); |
| 42 | cImag = float(y); |
| 43 | zReal = 0.0; |
| 44 | zImag = float(timeStep) / 10.0; |
| 45 | |
| 46 | zReal2 = zReal * zReal; |
| 47 | zImag2 = zImag * zImag; |
| 48 | v1 = (zReal2 + zImag2); |
| 49 | while v1 < 4.0 and count < 100: |
| 50 | zImag = 2.0 * zReal * zImag + cImag |
| 51 | zReal = zReal2 - zImag2 + cReal |
| 52 | zReal2 = zReal * zReal |
| 53 | zImag2 = zImag * zImag |
| 54 | count += 1 |
| 55 | v1 = (zReal2 + zImag2) |
| 56 | |
| 57 | return count == 100; |
| 58 | |
| 59 | |
| 60 | def mandelbrotSide(bounds): |
no outgoing calls
no test coverage detected