Skip to content

Commit

Permalink
Auto-update from libvoxelstorm: latest vectorstorm updates from TacWi…
Browse files Browse the repository at this point in the history
…ng (0fc2974)
  • Loading branch information
slowriot committed Dec 11, 2024
1 parent 4b96bd8 commit 41c7dbe
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vectorstorm/vector/vector2.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,13 @@ class vector2 {
}

//-------------[ unary operations ]--------------------------
/**
* Unary plus operator
* @return vector with unary + applied to its components
*/
inline vector2<T> constexpr operator+() const noexcept __attribute__((__always_inline__)) {
return vector2<T>(+x, +y);
}
/**
* Unary negate operator
* @return negated vector
Expand Down
7 changes: 7 additions & 0 deletions vectorstorm/vector/vector3.h
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,13 @@ class vector3 {
}

//-------------[ unary operations ]--------------------------
/**
* Unary plus operator
* @return vector with unary + applied to its components
*/
inline vector3<T> constexpr operator+() const noexcept __attribute__((__always_inline__)) {
return vector3<T>(+x, +y, +z);
}
/**
* Unary negate operator
* @return negated vector
Expand Down
7 changes: 7 additions & 0 deletions vectorstorm/vector/vector4.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,13 @@ class vector4 {
}

//-------------[ unary operations ]--------------------------
/**
* Unary plus operator
* @return vector with unary + applied to its components
*/
inline vector4<T> constexpr operator+() const noexcept __attribute__((__always_inline__)) {
return vector4<T>(+x, +y, +z, +w);
}
/**
* Unary negate operator
* @return negated vector
Expand Down

0 comments on commit 41c7dbe

Please sign in to comment.