// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Math module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_MATH_PIDCONTROLLER_HPP #define NAZARA_MATH_PIDCONTROLLER_HPP namespace Nz { template class PidController { public: PidController(float p, float i, float d); T Update(const T& currentError, float elapsedTime); private: T m_lastError; T m_integral; float m_dFactor; float m_iFactor; float m_pFactor; }; } #include #endif // NAZARA_MATH_PIDCONTROLLER_HPP