added rotation to vector2

This commit is contained in:
herbglitch 2023-02-19 12:11:33 -07:00
parent edaddeb109
commit 0d9cf0f7f5
2 changed files with 19 additions and 0 deletions

View file

@ -13,8 +13,21 @@ 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