alle methoden die ich brauche sind deklariert

This commit is contained in:
Tobias Kachel 2026-05-07 16:53:07 +02:00
parent 09c8ca75fe
commit b636977ccd
2 changed files with 8 additions and 8 deletions

View File

@ -5,14 +5,14 @@
using namespace std; using namespace std;
Vektor Vektor::mulVektor(const Vektor &vec, const float &skalar){ void Vektor::mul(const float &skalar){
Vektor ergebnis = {vec.x * skalar, vec.y * skalar}; this->x *= skalar;
return ergebnis; this->y *= skalar;
} }
Vektor addVektor(const Vektor &vec1, const Vektor &vec2) { void Vektor::add(const Vektor &vec2) {
Vektor erg = {x + x, y + y}; this->x += vec2.x;
return erg; this->y += vec2.y;
} }
Koerper bewegeKoerper(const Koerper &korp, const Vektor &gesamtkraft,const float &dt) { Koerper bewegeKoerper(const Koerper &korp, const Vektor &gesamtkraft,const float &dt) {

View File

@ -30,9 +30,9 @@ public:
this->geschwindigkeit = geschwindigkeit; this->geschwindigkeit = geschwindigkeit;
}; };
float liefereMasse(); float liefereMasse();
Koerper bewegeKoerper(const Koerper &korp, const Vektor &gesamtkraft, Koerper bewegeKoerper(const Koerper &korp, const Vektor &gesamtkraft, const float &dt);
const float &dt);
Vektor lieferePosition(); Vektor lieferePosition();
Vektor liefereGeschwindigkeit(); Vektor liefereGeschwindigkeit();
void bewegen(Vektor beschleunigung, float dt); void bewegen(Vektor beschleunigung, float dt);
string text();
}; };