]> gitweb.hamatoma.de Git - jkurs/commitdiff
Synchronisierung mit dem externen Repository master
authorhama <hama@siduction.net>
Mon, 22 Sep 2014 06:52:32 +0000 (08:52 +0200)
committerhama <hama@siduction.net>
Mon, 22 Sep 2014 06:52:32 +0000 (08:52 +0200)
src/de/hamatoma/jkurs/Lesson1.java [new file with mode: 0644]
src/de/hamatoma/jkurs/Lesson1b.java [new file with mode: 0644]

diff --git a/src/de/hamatoma/jkurs/Lesson1.java b/src/de/hamatoma/jkurs/Lesson1.java
new file mode 100644 (file)
index 0000000..c3da7c5
--- /dev/null
@@ -0,0 +1,39 @@
+/**
+ * 
+ */
+package de.hamatoma.jkurs;
+
+import java.lang.Math;
+
+public class Lesson1 {
+       public static void main(String[] args) {
+               double a = 1;
+               double s = 2;
+               double w0 = Math.atan(a / s);
+               double lastW = w0;
+               int n = 1;
+               double wN = Math.atan(a / (s - n / 100.0));
+               System.out.println(String.format("1: Winkel: %f Diff: %f", wN, wN
+                               - lastW));
+               lastW = wN;
+               n = 2;
+               wN = Math.atan(a / (s - n / 100.0));
+               System.out.println(String.format("%d: Winkel: %f Diff: %f", n, wN, wN
+                               - lastW));
+               lastW = wN;
+               n = 3;
+               wN = Math.atan(a / (s - n / 100.0));
+               System.out.println(String.format("%d: Winkel: %f Diff: %f", n, wN, wN
+                               - lastW));
+               lastW = wN;
+               n = 4;
+               wN = Math.atan(a / (s - n / 100.0));
+               System.out.println(String.format("%d: Winkel: %f Diff: %f", n, wN, wN
+                               - lastW));
+               lastW = wN;
+               n = 5;
+               wN = Math.atan(a / (s - n / 100.0));
+               System.out.println(String.format("%d: Winkel: %f Diff: %f", n, wN, wN
+                               - lastW));
+       }
+}
diff --git a/src/de/hamatoma/jkurs/Lesson1b.java b/src/de/hamatoma/jkurs/Lesson1b.java
new file mode 100644 (file)
index 0000000..f4024f1
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ *
+ */
+package de.hamatoma.jkurs;
+
+/**
+ * @author hm
+ *
+ */
+public class Lesson1b {
+
+    /**
+     * @param args
+     */
+    public static void main(String[] args) {
+        double a = 1;
+        double s = 2;
+        double w0 = Math.atan(a / s);
+        double lastW = w0;
+        int n = 1;
+        double wN = Math.atan(a / (s - n / 100.0));
+        System.out.println(String.format("1: Winkel: %f Diff: %f", wN, wN
+            - lastW));
+        lastW = wN;
+        n = 2;
+        wN = Math.atan(a / (s - n / 100.0));
+        System.out.println(String.format("%d: Winkel: %f Diff: %f", n, wN, wN
+            - lastW));
+        lastW = wN;
+        n = 3;
+        wN = Math.atan(a / (s - n / 100.0));
+        System.out.println(String.format("%d: Winkel: %f Diff: %f", n, wN, wN
+            - lastW));
+        lastW = wN;
+        n = 4;
+        wN = Math.atan(a / (s - n / 100.0));
+        System.out.println(String.format("%d: Winkel: %f Diff: %f", n, wN, wN
+            - lastW));
+        lastW = wN;
+        n = 5;
+        wN = Math.atan(a / (s - n / 100.0));
+        System.out.println(String.format("%d: Winkel: %f Diff: %f", n, wN, wN
+            - lastW));
+    }
+
+}