DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SmoothCDPI2PI()

static float Math::SmoothCDPI2PI ( float val,
float target,
inout float velocity[],
float smoothTime,
float maxVelocity,
float dt )
inlinestaticprivate

См. определение в файле EnMath.c строка 680

681 {
682 float diff = target - val;
683 if (diff < -Math.PI)
684 {
685 target += Math.PI2;
686 }
687 else if (diff > Math.PI)
688 {
689 target -= Math.PI2;
690 }
691
692 float retVal = SmoothCD(val, target, velocity, smoothTime, maxVelocity, dt);
693
694 while (retVal > Math.PI)
695 {
696 retVal -= Math.PI2;
697 }
698
699 while (retVal < -Math.PI)
700 {
701 retVal += Math.PI2;
702 }
703
704 return retVal;
705 }
void Math()
Определения EnMath.c:8
static proto float SmoothCD(float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
Does the CD smoothing function - easy in | easy out / S shaped smoothing.

Перекрестные ссылки Math() и SmoothCD().

Используется в OnUpdate().