Vector2.getNormalized() - Mtax-Development/GML-OOP GitHub Wiki
Name |
Type |
Optional |
magnitude? |
{real} |
Yes |
{Vector2}
Return the unit vector of this Vector2, which will have its values placed between -1 and 1, but with the same direction. These values are then multiplied by the specified magnitude. If this operation would be invalid, a directionless vector will be returned.