mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -17,7 +17,7 @@ template<typename T>
|
|||
using Matrix4x4 = Matrix<4, T>;
|
||||
|
||||
template<typename T>
|
||||
constexpr static Vector4<T> operator*(const Matrix4x4<T>& m, const Vector4<T>& v)
|
||||
constexpr static Vector4<T> operator*(Matrix4x4<T> const& m, Vector4<T> const& v)
|
||||
{
|
||||
auto const& elements = m.elements();
|
||||
return Vector4<T>(
|
||||
|
@ -30,7 +30,7 @@ constexpr static Vector4<T> operator*(const Matrix4x4<T>& m, const Vector4<T>& v
|
|||
// FIXME: this is a specific Matrix4x4 * Vector3 interaction that implies W=1; maybe move this out of LibGfx
|
||||
// or replace a Matrix4x4 * Vector4 operation?
|
||||
template<typename T>
|
||||
constexpr static Vector3<T> transform_point(const Matrix4x4<T>& m, const Vector3<T>& p)
|
||||
constexpr static Vector3<T> transform_point(Matrix4x4<T> const& m, Vector3<T> const& p)
|
||||
{
|
||||
auto const& elements = m.elements();
|
||||
return Vector3<T>(
|
||||
|
@ -40,7 +40,7 @@ constexpr static Vector3<T> transform_point(const Matrix4x4<T>& m, const Vector3
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr static Matrix4x4<T> translation_matrix(const Vector3<T>& p)
|
||||
constexpr static Matrix4x4<T> translation_matrix(Vector3<T> const& p)
|
||||
{
|
||||
return Matrix4x4<T>(
|
||||
1, 0, 0, p.x(),
|
||||
|
@ -50,7 +50,7 @@ constexpr static Matrix4x4<T> translation_matrix(const Vector3<T>& p)
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr static Matrix4x4<T> scale_matrix(const Vector3<T>& s)
|
||||
constexpr static Matrix4x4<T> scale_matrix(Vector3<T> const& s)
|
||||
{
|
||||
return Matrix4x4<T>(
|
||||
s.x(), 0, 0, 0,
|
||||
|
@ -60,7 +60,7 @@ constexpr static Matrix4x4<T> scale_matrix(const Vector3<T>& s)
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr static Matrix4x4<T> rotation_matrix(const Vector3<T>& axis, T angle)
|
||||
constexpr static Matrix4x4<T> rotation_matrix(Vector3<T> const& axis, T angle)
|
||||
{
|
||||
T c, s;
|
||||
AK::sincos(angle, s, c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue