Skip to content

Commit

Permalink
libcore|Math: Added 2D cross product
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Dec 12, 2019
1 parent 1c1789e commit 9f89f92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doomsday/sdk/libcore/include/de/core/vector.h
Expand Up @@ -243,9 +243,12 @@ class Vector2
Vector2 abs() const {
return Vector2(de::abs(x), de::abs(y));
}
ddouble dot(Vector2 const &other) const {
double dot(const Vector2 &other) const {
return x * other.x + y * other.y;
}
double cross(const Vector2 &other) const {
return x * other.y - y * other.x;
}
Vector2 min(Vector2 const &other) const {
return Vector2(de::min(x, other.x), de::min(y, other.y));
}
Expand Down

0 comments on commit 9f89f92

Please sign in to comment.