Beschreibung | ||
Diese Funktion berechnet den Winkel aus einem Sinuswert. Es ist somit die Umkehrfunktion für Sinus. Mathematiker nennen es Arcussinus.
| ||
Parameter | ||
Zahl = eine beliebige Zahl, die zwischen -1 und 1 liegen muss | ||
Rückgabewert | ||
Kleinster Winkel in Grad. Die Grafik zeigt den Zusammenhang zwischen Winkel und Sinuswert.
| ||
Beispiel | ||
Dieses Beispiel demonstriert die Berechnung eines Winkels: GRAPHICS 640,480 REPEAT CLS x# = MOUSEX() y# = MOUSEY() r# = SQR((x#*x#)+(y#*y#)) COLOR 104,104,104 LINE x#,0,x#,y# LINE 0,y#,x#,y# LOCATE x#+10,y#-10 : WRITE "X=" : PRINT x# LOCATE x#-10,y#+10 : WRITE "Y=" : PRINT y# ORIGIN 0,0 COLOR 255,255,255 LINE 0,0,x#,y# theta# = ASIN(y#/r#) LOCATE 60,10 : WRITE "Winkel:" : PRINT theta FOR degrees#=0 TO theta# cy=SIN(degrees#)*50 cx=COS(degrees#)*50 PLOT cx,cy NEXT FLIP UNTIL KEYDOWN(1) | ||
Siehe auch | ||
ACOS, ATAN, ATAN2, COS, SIN, TAN |