update raymath.h: add Vector2CrossProduct function (#4520)
This commit is contained in:
parent
532167d28b
commit
415a98965a
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue