Backward compatibility (Mathd -> Math), fix and remove warnings.

This commit is contained in:
Jean-Baptiste Perrier
2021-08-12 14:15:26 +02:00
parent ed6f857ff3
commit 2948bfbed0
4 changed files with 6 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
#pragma once
#include "Engine/Core/Core.h"
#include "Engine/Core/Types/BaseTypes.h"
#include <math.h>

View File

@@ -5,7 +5,7 @@
#include <math.h>
#include "Engine/Core/Types/BaseTypes.h"
namespace Mathd
namespace Math
{
/// <summary>
/// Computes the sine and cosine of a scalar float.

View File

@@ -951,7 +951,7 @@ bool Variant::operator==(const Variant& other) const
case VariantType::Float:
return Math::NearEqual(AsFloat, other.AsFloat);
case VariantType::Double:
return Mathd::Abs(AsDouble - other.AsDouble) < ZeroTolerance;
return Math::Abs(AsDouble - other.AsDouble) < ZeroTolerance;
case VariantType::Pointer:
return AsPointer == other.AsPointer;
case VariantType::String:
@@ -1104,7 +1104,7 @@ Variant::operator bool() const
case VariantType::Float:
return !Math::IsZero(AsFloat);
case VariantType::Double:
return !Mathd::IsZero(AsDouble);
return !Math::IsZero(AsDouble);
case VariantType::Pointer:
return AsPointer != nullptr;
case VariantType::String:
@@ -2851,7 +2851,7 @@ Variant Variant::Cast(const Variant& v, const VariantType& to)
switch (to.Type)
{
case VariantType::Bool:
return Variant(Mathd::Abs(v.AsDouble) > ZeroTolerance);
return Variant(Math::Abs(v.AsDouble) > ZeroTolerance);
case VariantType::Int16:
return Variant((int16)v.AsDouble);
case VariantType::Int:

View File

@@ -4,6 +4,7 @@
#include "ModelTool.h"
#include "Engine/Core/Log.h"
#include "Engine/Core/Math/Mathd.h"
#include "Engine/Core/Math/Matrix.h"
#include "Engine/Core/Collections/Sorting.h"
#include "Engine/Platform/FileSystem.h"