archeus/include/arc/math/vector2.h

36 lines
666 B
C
Raw Normal View History

#ifndef ARC_MATH_VECTOR2_H_
#define ARC_MATH_VECTOR2_H_
2023-01-30 23:22:34 -07:00
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ARC_Vector2 {
float x, y;
2022-11-11 01:15:33 -07:00
} ARC_Vector2;
typedef struct ARC_DVector2 {
double x, y;
} ARC_DVector2;
2023-02-19 12:11:33 -07:00
/**
* @brief normalizes a given ARC_Vector2
*
* @param vector the ARC_Vecotr2 to normallize
*/
2023-01-30 23:22:34 -07:00
void ARC_Vector2_Normalize(ARC_Vector2 *vector);
2023-02-19 12:11:33 -07:00
/**
* @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);
2023-01-30 23:22:34 -07:00
#ifdef __cplusplus
}
#endif
#endif // ARC_MATH_VECTOR2_H_