From: hama Date: Mon, 22 Sep 2014 06:52:32 +0000 (+0200) Subject: Synchronisierung mit dem externen Repository X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=HEAD;p=jkurs Synchronisierung mit dem externen Repository --- diff --git a/src/de/hamatoma/jkurs/Lesson1.java b/src/de/hamatoma/jkurs/Lesson1.java new file mode 100644 index 0000000..c3da7c5 --- /dev/null +++ b/src/de/hamatoma/jkurs/Lesson1.java @@ -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 index 0000000..f4024f1 --- /dev/null +++ b/src/de/hamatoma/jkurs/Lesson1b.java @@ -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)); + } + +}