diff --git a/engine/Engine.cpp b/engine/Engine.cpp index 307cc73..8883275 100644 --- a/engine/Engine.cpp +++ b/engine/Engine.cpp @@ -166,7 +166,9 @@ void Engine::printDebugInfo() const { screen->drawText( - timerName.substr(2, timerName.size()) + " (" + std::to_string((int) (100 * timer.elapsedMilliseconds() / totalTime)) + "%)", + timerName.substr(2, timerName.size()) + ":\t" + + std::to_string((int) (1.0 / timer.elapsedMilliseconds())) + " / s \t (" + + std::to_string((int) (100 * timer.elapsedMilliseconds() / totalTime)) + "%)", Vec2D{xPos + 10, yPos + height * i + 5}, 30, sf::Color(0, 0, 0, 100)); @@ -184,7 +186,8 @@ void Engine::printDebugInfo() const { 0, 100}); - screen->drawText("other (" + std::to_string((int) (100 * (totalTime - timeSum) / totalTime)) + "%)", + screen->drawText("other:\t" + std::to_string((int) (1.0 / (totalTime - timeSum))) + " / s \t (" + + std::to_string((int) (100 * (totalTime - timeSum) / totalTime)) + "%)", Vec2D{xPos + 10, yPos + height * i + 5}, 30, sf::Color(0, 0, 0, 100)); diff --git a/engine/Vec3D.cpp b/engine/Vec3D.cpp index b216a2f..3a41ca4 100644 --- a/engine/Vec3D.cpp +++ b/engine/Vec3D.cpp @@ -71,7 +71,7 @@ double Vec3D::abs() const { Vec3D Vec3D::normalized() const { double vecAbs = abs(); if (vecAbs > Consts::EPS) { - return Vec3D(*this) / abs(); + return Vec3D(*this) / vecAbs; } else { return Vec3D(1); } diff --git a/engine/animation/AScale.h b/engine/animation/AScale.h index adba083..c559d8d 100644 --- a/engine/animation/AScale.h +++ b/engine/animation/AScale.h @@ -27,7 +27,6 @@ private: t * Matrix4x4::Scale(Vec3D{1, 1, 1} + (_scalingValue - Vec3D{1, 1, 1}) * progress())); } _object.lock()->setTriangles(newTriangles); - return updateState(); } public: