Implement Vector2::Abs() and Vector3::Abs()

This commit is contained in:
2024-02-06 16:34:26 -05:00
parent e18a2634de
commit 8fa94c1519
2 changed files with 4 additions and 0 deletions

View File

@@ -253,4 +253,6 @@ namespace J3ML::LinearAlgebra {
Vector2 Vector2::Div(const Vector2 &v) const {
return {this->x/v.x, this->y/v.y};
}
Vector2 Vector2::Abs() const { return {std::abs(x), std::abs(y)};}
}