I'm trying to figure out how to create a unit vector / normalized Vector2 instance given an angle (degrees). I encountered the following as I was reading pygame's documentation at https://www.pygame.org/docs/ref/math.html#pygame.math.Vector2 :
Vector2() -> Vector2
Vector2(int) -> Vector2
Vector2(float) -> Vector2
Vector2(Vector2) -> Vector2
Vector2(x, y) -> Vector2
Vector2((x, y)) -> Vector2
To my understanding, they generate the following vectors:
Vector2() -> (0, 0)
Vector2(Vector2) -> (Vector2.x, Vector2.y)
Vector2(x, y) -> (x, y)
Vector2((x, y)) -> (x, y)
But what do int and float parameter datatypes indicate? Also, please correct if I have misunderstood the above assumptions.
Moreover, can I instantiate a normalized Vector2 object given an angle or do I need to do some trigonometry with math library first?