Loading...
Searching...
No Matches
vector2.h
Go to the documentation of this file.
#ifndef ARC_MATH_VECTOR2_H_
#define ARC_MATH_VECTOR2_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ARC_Vector2 {
float x, y;
} ARC_Vector2;
typedef struct ARC_DVector2 {
double x, y;
} ARC_DVector2;
/**
* @brief normalizes a given ARC_Vector2
*
* @param vector the ARC_Vecotr2 to normallize
*/
void ARC_Vector2_Normalize(ARC_Vector2 *vector);
/**
* @brief rotates a given ARC_Vector2 by a given angle in degrees
*
* @param vector the ARC_Vector2 to rotate
* @param angle the angle in degrees to rotate by
*/
void ARC_Vector2_RotateDegree(ARC_Vector2 *vector, float angle);
#ifdef __cplusplus
}
#endif
#endif // ARC_MATH_VECTOR2_H_
ARC_DVector2
Definition vector2.h:12
ARC_DVector2::y
double y
Definition vector2.h:13
ARC_DVector2::x
double x
Definition vector2.h:13
ARC_Vector2
Definition vector2.h:8
ARC_Vector2::x
float x
Definition vector2.h:9
ARC_Vector2::y
float y
Definition vector2.h:9
ARC_Vector2_RotateDegree
void ARC_Vector2_RotateDegree(ARC_Vector2 *vector, float angle)
rotates a given ARC_Vector2 by a given angle in degrees
ARC_DVector2
struct ARC_DVector2 ARC_DVector2
ARC_Vector2
struct ARC_Vector2 ARC_Vector2
ARC_Vector2_Normalize
void ARC_Vector2_Normalize(ARC_Vector2 *vector)
normalizes a given ARC_Vector2