Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht
  1.  
    		vector_t vec_angle(const vector_t a, const vector_t b){
    		    double vector_a;
    		    double vector_b;
    		    double angle = vec_dotp(vector_a,vector_b)/(vec_norm(vector_a)*vec_norm(vector_b));
    		    if (angle <-1.0){
    		        angle = -1.0;
    		    }
    		    if (angle > +1.0){
    		        angle = +1.0;
    		    }
    		    return acos(angle);			
     
 
  1. Definieren Sie eine Funktion zur Ermittlung des eingeschlossenen Winkels zwischen zwei Vektoren unter Verwendung der o. g. Funktionen für den Betrag und das Skalar- produkt (beachten Sie die numerischen Probleme mit der Division und dem Argument des acos()).

Bearbeitet von Tikorz

Leider weiß ich nicht was das Problem sein könnte . Könnt ihr mir Lösüngsansätze geben ?

Erstmal ist deine Funktion ziemlich sinnlos, wenn du doubles vector_a und vector_b definierst anstatt direkt die übergenen a und b zu verwenden. Genau da wird wohl auch dein Problem liegen, weil eine Funktion wie vec_dotp vermutlich Vektortypen erwartet und nicht doubles.

Abgesehen davon ist es aber schwierig zu helfen, wenn du nicht mal postet was die Fehlermeldung ist.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.