diff options
-rw-r--r-- | ws2015/eip/blaetter/04/Schleife.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ws2015/eip/blaetter/04/Schleife.java b/ws2015/eip/blaetter/04/Schleife.java index a693cb0..09c10fb 100644 --- a/ws2015/eip/blaetter/04/Schleife.java +++ b/ws2015/eip/blaetter/04/Schleife.java | |||
@@ -28,8 +28,8 @@ public class Schleife { | |||
28 | } | 28 | } |
29 | 29 | ||
30 | private static double f(int x, int y) { | 30 | private static double f(int x, int y) { |
31 | double xprime = (x - 200) / 120; | 31 | double xprime = (x - 200) / 120.0; |
32 | double yprime = (200 - y) / 100; | 32 | double yprime = (200 - y) / 100.0; |
33 | return Math.pow(xprime * xprime + yprime * yprime - 1, 3) - (xprime * xprime * yprime * yprime * yprime); | 33 | return Math.pow(xprime * xprime + yprime * yprime - 1, 3) - (xprime * xprime * yprime * yprime * yprime); |
34 | // pow is comparatively expensive (at least it would be if this were C ;) ) | 34 | // pow is comparatively expensive (at least it would be if this were C ;) ) |
35 | } | 35 | } |