#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); /** * @brief * * @param vector1 * @param vector2 */ float ARC_Vector2_CrossProduct(ARC_Vector2 vector1, ARC_Vector2 vector2); /** * @brief * * @param vector * @param scalar */ ARC_Vector2 ARC_Vector2_CrossProductScalar(ARC_Vector2 vector, float scalar); /** * @brief * * @param scalar * @param vector */ ARC_Vector2 ARC_Vector2_ScalarCrossProduct(float scalar, ARC_Vector2 vector); #ifdef __cplusplus } #endif #endif // ARC_MATH_VECTOR2_H_