diff --git a/src/math/vector2.c b/src/math/vector2.c new file mode 100644 index 0000000..c63bdf0 --- /dev/null +++ b/src/math/vector2.c @@ -0,0 +1,8 @@ +#include "arc/math/vector2.h" +#include + +void ARC_Vector2_Normalize(ARC_Vector2 *vector){ + float length = sqrtf((vector->x * vector->x) + (vector->y * vector->y)); + vector->x /= length; + vector->y /= length; +} \ No newline at end of file