Update raymath.h
This commit is contained in:
parent
6a8e4795da
commit
b8055925bf
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,7 @@ RMDEF Vector2 Vector2Rotate(Vector2 v, float degs)
|
||||||
// Move Vector towards target
|
// Move Vector towards target
|
||||||
RMDEF Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance)
|
RMDEF Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance)
|
||||||
{
|
{
|
||||||
Vector2 result = { 0 }
|
Vector2 result = { 0 };
|
||||||
float dx = target.x - v.x;
|
float dx = target.x - v.x;
|
||||||
float dy = target.y - v.y;
|
float dy = target.y - v.y;
|
||||||
float value = (dx*dx) + (dy*dy);
|
float value = (dx*dx) + (dy*dy);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue