home *** CD-ROM | disk | FTP | other *** search
/ com!online 2002 April / comcd0402.iso / vollver / office60 / f_0021 / sbasic.jar / text / sbasic / common / 03080102.xml < prev    next >
Encoding:
Extensible Markup Language  |  2002-01-24  |  2.8 KB  |  40 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>Cos-Funktion [Runtime]</title><meta name="filename" content="text/sbasic/common/03080102"/><meta name="language" content="de-DE"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         p.P1{
  5.                 }
  6.         p.P2{
  7.                 }
  8.         span.T1{
  9.                 font-weight:bold;}
  10.         </style></head><body>
  11.   
  12.   
  13.   <help:to-be-embedded Eid="cos" xmlns:help="http://openoffice.org/2000/help">
  14.   <p class="Head1"><help:link Id="66601">Cos-Funktion [Runtime]</help:link></p>
  15.   <p class="Paragraph">Ermittelt den Kosinus eines Winkels. Der Winkel wird im Bogenma├ƒ (in Radiant) angegeben. Das Ergebnis liegt im Bereich von -1 bis 1.</p>
  16.   </help:to-be-embedded>
  17.   <p class="Paragraph">Die Cos-Funktion bestimmt aus einem Winkel Alpha das L├ñngenverh├ñltnis von Ankathete zu Hypotenuse in einem rechtwinkligen Dreieck. Es gilt:</p>
  18.   <p class="Paragraph">Cos(Alpha) = Ankathete/Hypotenuse</p>
  19.   <p class="Paragraph"><span class="T1">Syntax</span>:</p>
  20.   <p class="Paragraph">Cos (Number) <help:key-word value="Cos" tag="kw66601_1" xmlns:help="http://openoffice.org/2000/help"/></p>
  21.   <p class="Paragraph"><span class="T1">R├╝ckgabe</span>: <text:s text:c="3" xmlns:text="http://openoffice.org/2000/text"/></p>
  22.   <p class="Paragraph">Double</p>
  23.   <p class="Paragraph"><span class="T1">Parameter</span>:</p>
  24.   <p class="Paragraph">Number: Numerischer Ausdruck, der einen Winkel im Bogenma├ƒ angibt, dessen Kosinus berechnet werden soll.</p>
  25.   <p class="Paragraph">Zur Umrechnung von Grad in Radiant mu├ƒ die Gradangabe mit Pi/180 multipliziert werden, und zur Umrechnung von Radiant in Grad mu├ƒ das Bogenma├ƒ mit 180/Pi multipliziert werden.</p>
  26.   <p class="Paragraph">grad=(radiant*180)/pi</p>
  27.   <p class="Paragraph">radiant=(grad*pi)/180</p>
  28.   <p class="Paragraph">Pi ist hierbei die feste Kreiskonstante mit dem Wert von 3.141592657... .</p>
  29.   <p class="P2">Beispiel:</p>
  30.   <p class="PropText">REM Das folgende Beispielprogramm erlaubt f├╝r ein rechtwinkeliges Dreieck die Eingabe von </p>
  31.   <p class="PropText">REM Ankathete und Winkel (in Grad) und berechnet daraus die L├ñnge der Hypotenuse: </p>
  32.   <p class="PropText">Sub ExampleCosinus </p>
  33.   <p class="PropText">REM Pi = 3.1415926 </p>
  34.   <p class="PropText">Dim d1 as Double, dAngle as Double </p>
  35.   <p class="PropText">d1 = InputBox$ ("Bitte geben Sie die L├ñnge der Ankathete ein: ","Ankathete") </p>
  36.   <p class="PropText">dAngle = InputBox$ ("Bitte geben Sie den Winkel Alpha ein (in Grad): ","Alpha") </p>
  37.   <p class="PropText">Print "Die L├ñnge der Hypotenuse betr├ñgt"; (d1 / cos (dAngle * Pi / 180)) </p>
  38.   <p class="PropText">End Sub </p>
  39.   <p class="PropText"><text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/></p>
  40.  </body></html>