From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../hjp5/html/k100116.html | 211 +++++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 Master/Reference Architectures and Patterns/hjp5/html/k100116.html (limited to 'Master/Reference Architectures and Patterns/hjp5/html/k100116.html') diff --git a/Master/Reference Architectures and Patterns/hjp5/html/k100116.html b/Master/Reference Architectures and Patterns/hjp5/html/k100116.html new file mode 100644 index 0000000..9210886 --- /dev/null +++ b/Master/Reference Architectures and Patterns/hjp5/html/k100116.html @@ -0,0 +1,211 @@ + + + +Handbuch der Java-Programmierung, 5. Auflage + + + + + + + + + +
 Titel  + Inhalt  + Suchen  + Index  + DOC  +Handbuch der Java-Programmierung, 5. Auflage +
 <<  +  <   +  >   + >>  + API  +Kapitel 17 - Utility-Klassen II +
+
+ + + + +

17.2 Die Klasse Math

+
+ +
+ +

+Die Klasse Math +aus dem Paket java.lang +enthält Methoden zur Fließkomma-Arithmetik. Alle Methoden +dieser Klasse sind static +und können daher ohne konkretes Objekt verwendet werden. Nachfolgend +wollen wir die wichtigsten von ihnen auflisten und eine kurze Beschreibung +ihrer Funktionsweise geben. + + + + +

17.2.1 Winkelfunktionen

+ +

+java.lang.Math +stellt die üblichen Winkelfunktionen und ihre Umkehrungen zur +Verfügung. Winkelwerte werden dabei im Bogenmaß übergeben. + + +

+ + + + + +
+ +
+public static double sin(double x)
+public static double cos(double x)
+public static double tan(double x)
+public static double asin(double x)
+public static double acos(double x)
+public static double atan(double x)
+
+
+
+java.lang.Math
+ + + + +

17.2.2 Minimum und Maximum

+ +

+Die Methoden min +und max +erwarten zwei numerische Werte als Argument und geben das kleinere +bzw. größere von beiden zurück. +

+ + + + + +
+ +
+public static int min(int a, int b)
+public static long min(long a, long b)
+public static float min(float a, float b)
+public static double min(double a, double b)
+
+public static int max(int a, int b)
+public static long max(long a, long b)
+public static float max(float a, float b)
+public static double max(double a, double b)
+
+
+
+java.lang.Math
+ + + + +

17.2.3 Arithmetik

+ +

+Die nachfolgend aufgelisteten Methoden dienen zur Berechnung der Exponentialfunktion +zur Basis e, zur Berechnung des natürlichen Logarithmus +und zur Berechnung der Exponentialfunktion zu einer beliebigen Basis. +Mit sqrt +kann die Quadratwurzel berechnet werden. + +

+ + + + + +
+ +
+public static double exp(double a)
+
+public static double log(double a)
+   throws ArithmeticException
+
+public static double pow(double a, double b)
+   throws ArithmeticException
+
+public static double sqrt(double a)
+   throws ArithmeticException
+
+
+
+java.lang.Math
+ + + + +

17.2.4 Runden und Abschneiden

+ +

+Mit Hilfe der Methode abs +wird der absolute Betrag eines numerischen Werts bestimmt. ceil +liefert die kleinste ganze Zahl größer und floor +die größte ganze Zahl kleiner oder gleich dem übergebenen +Argument. Mit Hilfe von round +kann ein Wert gerundet werden. +

+ + + + + +
+ +
+public static int abs(int a)
+public static long abs(long a)
+public static float abs(float a)
+public static double abs(double a)
+
+public static double ceil(double a)
+public static double floor(double a)
+public static int round(float a)
+
+
+
+java.lang.Math
+


+ + + +
 Titel  + Inhalt  + Suchen  + Index  + DOC  +Handbuch der Java-Programmierung, 5. Auflage, Addison +Wesley, Version 5.0.1 +
 <<  +  <   +  >   + >>  + API  +© 1998, 2007 Guido Krüger & Thomas +Stark, http://www.javabuch.de +
+ + + -- cgit v1.2.3