Browse Source

update raymath.h: add Vector2CrossProduct function (#4520)

pull/4523/head
Gael Pérez 2 months ago
committed by GitHub
parent
commit
415a98965a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/raymath.h

+ 8
- 0
src/raymath.h View File

@ -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…
Cancel
Save