Files
c-prime/application/source/engine/vector4.c

56 lines
461 B
C
Raw Normal View History

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