Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
ist der parameter ein wert in rad? (Radiant) und du musst diesen in Winkelgrad umwandeln?Nun muss ich den double Wert innerhalb der Funktion in einen Grad Wert umwandeln und weiß nicht wie ich dies tun kann.
static double winkelInGrad;
static final double PI = 3.1415;
public static void drehe(double winkel){
winkelInGrad = winkel * 180 / PI; //
}
public static double richtungsWinkel = 0;
public static void drehe(double winkel){
}
hier geht es nur darum das ich die Gradzahl bekomme, damit ich mit der Rechnung weitermachen kann.
public static double cos(double a)
Returns the trigonometric cosine of an angle. Special cases:
If the argument is NaN or an infinity, then the result is NaN.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
Parameters:
a - an angle, in RADIANS.
Returns:
the cosine of the argument.