Skip to content

Commit

Permalink
AP_Math: Added LieGroup APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
patwilt authored and tridge committed May 8, 2024
1 parent d070d38 commit d0875d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libraries/AP_Math/LieGroups.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ GL2 GL2::operator+(const GL2& rhs) const {
_a22 + rhs._a22
);
}
GL2 GL2::operator-(const GL2& rhs) const {
return GL2(
_a11 - rhs._a11,
_a12 - rhs._a12,
_a21 - rhs._a21,
_a22 - rhs._a22
);
}

Vector2F GL2::operator*(const Vector2F& rhs) const {
ftype v1 = _a11*rhs.x + _a12*rhs.y;
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_Math/LieGroups.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class GL2 {
}
GL2 operator*(const GL2& rhs) const;
GL2 operator+(const GL2& rhs) const;
GL2 operator-(const GL2& rhs) const;
Vector2F operator*(const Vector2F& rhs) const;
GL2 inverse() const;
GL2 transposed() const;
Expand Down

0 comments on commit d0875d0

Please sign in to comment.