Skip to content

Commit a81f4d8

Browse files
committed
format
1 parent d50d901 commit a81f4d8

4 files changed

Lines changed: 29 additions & 48 deletions

File tree

.vscode/tasks.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@
2222
"group": "build"
2323
},
2424
{
25-
"label": "test_clang++_debug",
25+
"label": "test_clang++-dev",
2626
"type": "shell",
27-
"command": "make test CXX=clang++ config=dbg",
27+
"command": "make test CXX=clang++ config=dev",
2828
"problemMatcher": [
2929
"$gcc"
3030
],
3131
"group": "build"
3232
},
3333
{
34-
"label": "test_g++_debug",
34+
"label": "test_g++-dev",
3535
"type": "shell",
36-
"command": "make test CXX=g++ config=dbg",
36+
"command": "make test CXX=g++ config=dev",
3737
"problemMatcher": [
3838
"$gcc"
3939
],
@@ -42,7 +42,7 @@
4242
{
4343
"label": "format",
4444
"type": "shell",
45-
"command": "make apply-format",
45+
"command": "make format",
4646
"problemMatcher": [
4747
"$gcc"
4848
],

src/r4/matrix.hpp

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class matrix :
8383
template <size_t... indices>
8484
constexpr matrix(
8585
std::initializer_list<vector<component_type, num_columns>> rows,
86-
std::index_sequence<indices...>
86+
std::index_sequence<indices...> //
8787
) noexcept :
8888
base_type{*std::next(rows.begin(), indices)...}
8989
{}
@@ -114,14 +114,12 @@ class matrix :
114114
* @param quat - unit quaternion defining the rotation.
115115
*/
116116
template <typename enable_type = component_type>
117-
constexpr matrix(
118-
const quaternion< //
119-
std::enable_if_t<
120-
num_rows == num_columns && (num_rows == 3 || num_rows == 4), //
121-
enable_type //
122-
> //
123-
>& quat
124-
) noexcept
117+
constexpr matrix(const quaternion< //
118+
std::enable_if_t<
119+
num_rows == num_columns && (num_rows == 3 || num_rows == 4), //
120+
enable_type //
121+
> //
122+
>& quat) noexcept
125123
{
126124
this->set(quat);
127125
}
@@ -213,14 +211,12 @@ class matrix :
213211
* @return Reference to this matrix object.
214212
*/
215213
template <typename enable_type = component_type>
216-
matrix& set(
217-
const quaternion< //
218-
std::enable_if_t<
219-
num_rows == num_columns && (num_rows == 3 || num_rows == 4), //
220-
enable_type //
221-
> //
222-
>& quat
223-
) noexcept
214+
matrix& set(const quaternion< //
215+
std::enable_if_t<
216+
num_rows == num_columns && (num_rows == 3 || num_rows == 4), //
217+
enable_type //
218+
> //
219+
>& quat) noexcept
224220
{
225221
// Quaternion to matrix conversion:
226222
// | 1-(2y^2+2z^2) 2xy-2zw 2xz+2yw 0 |
@@ -921,14 +917,12 @@ class matrix :
921917
* @return reference to this matrix object.
922918
*/
923919
template <typename enable_type = component_type>
924-
matrix& rotate(
925-
const quaternion< //
926-
std::enable_if_t<
927-
num_rows == num_columns && (num_rows == 3 || num_rows == 4), //
928-
enable_type //
929-
> //
930-
>& q
931-
) noexcept
920+
matrix& rotate(const quaternion< //
921+
std::enable_if_t<
922+
num_rows == num_columns && (num_rows == 3 || num_rows == 4), //
923+
enable_type //
924+
> //
925+
>& q) noexcept
932926
{
933927
return this->operator*=(matrix<component_type, num_rows, num_columns>(q));
934928
}

src/r4/quaternion.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,11 @@ class quaternion
551551
* @return Rotation matrix.
552552
*/
553553
template <size_t dimension>
554-
matrix<std::enable_if_t<dimension == 3 || dimension == 4, component_type>, dimension, dimension>
554+
matrix< //
555+
std::enable_if_t<dimension == 3 || dimension == 4, component_type>,
556+
dimension,
557+
dimension //
558+
>
555559
to_matrix() const noexcept;
556560

557561
/**

src/r4/vector.hpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -783,23 +783,6 @@ class vector :
783783
}
784784
}
785785

786-
/**
787-
* @brief Cross product.
788-
* First three components of the resulting 4d vector is a result of cross
789-
* product between two 3d vectors formed from first 3 components of initial 4d vectors.
790-
* The forth component is a simple multiplication of 4th components of initial vectors.
791-
* @param vec - vector to multiply by.
792-
* @return Cross product of this vector by given vector.
793-
*/
794-
template <typename enable_type = vector>
795-
// TODO: remove deprecated stuff
796-
[[deprecated("use cross()")]] std::enable_if_t<dimension >= 3, enable_type> operator%(
797-
const vector& vec
798-
) const noexcept
799-
{
800-
return this->cross(vec);
801-
}
802-
803786
/**
804787
* @brief Component-wise multiplication.
805788
* Performs component-wise multiplication of two vectors.

0 commit comments

Comments
 (0)