DragonNest/Common/EngineUtil/TimeImp.cpp
2024-12-20 16:56:44 +08:00

18 lines
No EOL
1,002 B
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "StdAfx.h"
#include "TimeImp.h"
#ifdef _DEBUG
#define new new(_NORMAL_BLOCK,__FILE__,__LINE__)
#endif
float TimeImp::GetTimeVelocity( float fVelocity, LOCAL_TIME LocalTime, LOCAL_TIME PrevTime )
{
float fValue = ( LocalTime - PrevTime ) / TimeImp::m_fCriterionTime;
return powf( fVelocity, fValue );
}
float TimeImp::GetTimeVelocity( float fVelocity, float fDelta )
{
float fValue = ( fDelta * 1000.f ) / TimeImp::m_fCriterionTime;
return powf( fVelocity, fValue );
}