Files

53 lines
407 B
C
Raw Permalink Normal View History

2025-11-17 10:28:09 +01:00
class vector3{
float x;
float y;
float z;
constructor( float x, float y, float z ) {
this->x = x;
this->y = y;
this->z = z;
}
vector3 * operator+( vector3 * b ) {
this->add( b );
return this;
}
vector3 * operator+=( vector3 * b ) {
this->add( b );
return this;
}
void add( vector3 * b ) {
this->x += b->x;
this->y += b->y;
this->z += b->z;
}
}