Skip to content

Commit

Permalink
update raymath.h: add Vector2CrossProduct function (#4520)
Browse files Browse the repository at this point in the history
  • Loading branch information
uwiwiow authored Nov 20, 2024
1 parent 532167d commit 415a989
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/raymath.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@ RMAPI float Vector2DotProduct(Vector2 v1, Vector2 v2)
return result;
}

// Calculate two vectors cross product
RMAPI float Vector2CrossProduct(Vector2 v1, Vector2 v2)
{
float result = (v1.x*v2.y - v1.y*v2.x);

return result;
}

// Calculate distance between two vectors
RMAPI float Vector2Distance(Vector2 v1, Vector2 v2)
{
Expand Down

0 comments on commit 415a989

Please sign in to comment.