port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
struct STargetValue
{
float m_fValue;
float m_fTarget;
float m_fSpeed;
float m_fAcceleration;
float m_fFriction;
STargetValue
( float fValue,
float fTarget,
float fSpeed,
float fAcceleration,
float fFriction )
{
m_fValue= fValue;
m_fTarget= fTarget;
m_fSpeed= fSpeed;
m_fAcceleration= fAcceleration;
m_fFriction= fFriction;
}
void timeStep()
{
m_fValue+= m_fSpeed;
float fDist= m_fTarget - m_fValue;
m_fSpeed+= fDist * m_fAcceleration;
m_fSpeed*= m_fFriction;
}
};