Initial commit
This commit is contained in:
75
application/demos/example.opengl/engine/vector4.c
Normal file
75
application/demos/example.opengl/engine/vector4.c
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* This file is automaticaly generated, Please dont edit this file!
|
||||
*/
|
||||
#include <engine/vector4.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void vector4_constructor( vector4 * this, float x, float y, float z, float w ) {
|
||||
|
||||
this->x = x;
|
||||
|
||||
this->y = y;
|
||||
|
||||
this->z = z;
|
||||
|
||||
this->w = w;
|
||||
|
||||
}
|
||||
|
||||
vector4 * vector4_operator_plus( vector4 * this, vector4 * b ) {
|
||||
|
||||
vector4_add( this, b );
|
||||
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
vector4 * vector4_operator_add( vector4 * this, vector4 * b ) {
|
||||
|
||||
vector4_add( this, b );
|
||||
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
void vector4_add( vector4 * this, vector4 * b ) {
|
||||
|
||||
this->x += b->x;
|
||||
|
||||
this->y += b->y;
|
||||
|
||||
this->z += b->z;
|
||||
|
||||
this->w += b->w;
|
||||
|
||||
}
|
||||
|
||||
vector4 vector4_new(float x, float y, float z, float w) {
|
||||
|
||||
vector4 instance;
|
||||
|
||||
vector4_constructor( &instance, x, y, z, w);
|
||||
|
||||
return instance;
|
||||
|
||||
}
|
||||
|
||||
vector4 * vector4_newPointer(float x, float y, float z, float w) {
|
||||
|
||||
struct vector4 * pointer = malloc( sizeof ( struct vector4 ) );
|
||||
|
||||
vector4_constructor( pointer , x, y, z, w);
|
||||
|
||||
return pointer;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user