Exemplo n.º 1
0
    public float UpdateCyclic(float rawval, float cycle)
    {
        m_RawVal    = Cyclic.getNearest(m_RawVal, rawval, cycle);
        m_SmoothVal = Interpol.LerpCyclic(m_SmoothVal, m_RawVal, m_Lerp, cycle);
        int Offset = Cyclic.getOffset(m_SmoothVal, cycle);

        if (0 != Offset)
        {
            m_SmoothVal += cycle * Offset;
            m_RawVal    += cycle * Offset;
        }
        return(m_SmoothVal);
    }
Exemplo n.º 2
0
 public static float LerpCyclic(float v1, float v2, float t, float cycle)
 {
     return(Lerp(v1, Cyclic.getNearest(v1, v2, cycle), t));
 }