Indentations

Former-commit-id: 0d82a4464cb9369bc4ca5cf2d7780c921eff953d
This commit is contained in:
Gawaboumga
2015-08-21 11:32:29 +02:00
parent 0b390e45a1
commit 376df6a3b7
9 changed files with 33 additions and 35 deletions

View File

@@ -14,7 +14,7 @@ template<unsigned int N>
struct NzImplTupleUnpack
{
template <typename F, typename... ArgsT, typename... Args>
void operator()(F func, const std::tuple<ArgsT...>& t, Args&... args)
void operator()(F func, const std::tuple<ArgsT...>& t, Args&... args)
{
NzImplTupleUnpack<N-1>()(func, t, std::get<N-1>(t), args...);
}

View File

@@ -312,8 +312,8 @@ inline void NzColor::ToHSV(const NzColor& color, float* hue, float* saturation,
float g = color.g / 255.f;
float b = color.b / 255.f;
float min = std::min(std::min(r, g), b); //Min. value of RGB
float max = std::max(std::max(r, g), b); //Max. value of RGB
float min = std::min({r, g, b}); //Min. value of RGB
float max = std::max({r, g, b}); //Max. value of RGB
float deltaMax = max - min; //Delta RGB value

View File

@@ -27,7 +27,7 @@
#include <Nazara/Core/ThreadSafetyOff.hpp>
#endif
using NzDynLibFunc = int (*)(); // Type "générique" de pointeur sur fonction
using NzDynLibFunc = int (*)(); // Type "générique" de pointeur sur fonction
class NzDynLibImpl;

View File

@@ -80,7 +80,6 @@ class NzMatrix4
NzMatrix4& Set(const T matrix[16]);
//NzMatrix4(const NzMatrix3<T>& matrix);
NzMatrix4& Set(const NzMatrix4& matrix);
NzMatrix4& Set(NzMatrix4&& matrix);
template<typename U> NzMatrix4& Set(const NzMatrix4<U>& matrix);
NzMatrix4& SetRotation(const NzQuaternion<T>& rotation);
NzMatrix4& SetScale(const NzVector3<T>& scale);

View File

@@ -28,14 +28,12 @@ class NzVector3
~NzVector3() = default;
T AbsDotProduct(const NzVector3& vec) const;
T AngleBetween(const NzVector3& vec) const;
NzVector3 CrossProduct(const NzVector3& vec) const;
T Distance(const NzVector3& vec) const;
float Distancef(const NzVector3& vec) const;
T DotProduct(const NzVector3& vec) const;
T GetLength() const;

View File

@@ -64,9 +64,9 @@ template<typename T>
T NzVector3<T>::AngleBetween(const NzVector3& vec) const
{
// sqrt(a) * sqrt(b) = sqrt(a*b)
T divisor = std::sqrt(GetSquaredLength() * vec.GetSquaredLength());
T divisor = std::sqrt(GetSquaredLength() * vec.GetSquaredLength());
#if NAZARA_MATH_SAFE
#if NAZARA_MATH_SAFE
if (NzNumberEquals(divisor, F(0.0)))
{
NzString error("Division by zero");
@@ -325,7 +325,7 @@ NzVector3<T>& NzVector3<T>::Set(const NzVector4<T>& vec)
template<typename T>
T NzVector3<T>::SquaredDistance(const NzVector3& vec) const
{
return operator-(vec).GetSquaredLength();
return (*this - vec).GetSquaredLength();
}
template<typename T>

View File

@@ -121,11 +121,11 @@ NzVector4<T>& NzVector4<T>::Maximize(const NzVector4& vec)
if (vec.y > y)
y = vec.y;
if (vec.z > z)
z = vec.z;
if (vec.z > z)
z = vec.z;
if (vec.w > w)
w = vec.w;
if (vec.w > w)
w = vec.w;
return *this;
}
@@ -139,11 +139,11 @@ NzVector4<T>& NzVector4<T>::Minimize(const NzVector4& vec)
if (vec.y < y)
y = vec.y;
if (vec.z < z)
z = vec.z;
if (vec.z < z)
z = vec.z;
if (vec.w < w)
w = vec.w;
if (vec.w < w)
w = vec.w;
return *this;
}
@@ -447,9 +447,9 @@ template<typename T>
bool NzVector4<T>::operator==(const NzVector4& vec) const
{
return NzNumberEquals(x, vec.x) &&
NzNumberEquals(y, vec.y) &&
NzNumberEquals(z, vec.z) &&
NzNumberEquals(w, vec.w);
NzNumberEquals(y, vec.y) &&
NzNumberEquals(z, vec.z) &&
NzNumberEquals(w, vec.w);
}
template<typename T>