Files
c-prime/application/demos/example.console.log/vector2.h

50 lines
658 B
C
Raw Normal View History

2025-11-17 10:28:09 +01:00
#ifndef _vector2
#define _vector2
// Macros
#include "stdlib.h"
extern char * __ClassNames[];
// Includes
typedef struct vector2{
float x;
float y;
} vector2;
void vector2_constructor( vector2 * this, float x, float y );
vector2 * vector2_operator_plus( vector2 * this, vector2 * b );
vector2 * vector2_operator_add( vector2 * this, struct vector2 * b );
void vector2_add( vector2 * this, vector2 * a );
void vector2_subtract( vector2 * this, vector2 * a );
int vector2_length( vector2 * this );
vector2 vector2_new( float x, float y );
vector2 * vector2_newPointer( float x, float y );
#endif
typedef struct vector2 vector2;