コード例 #1
0
        public float Interpolate(float t)
        {
            PathCacheIndexInfo indexInfo = this.GetCacheIndexInfo(t);

            return(Mathf.Lerp(
                       Values[indexInfo.LowerIndex],
                       Values[indexInfo.UpperIndex],
                       indexInfo.PercentOfIndexes));
        }
コード例 #2
0
        public Vector3 Evaluate(float t, out PathCacheIndexInfo indexInfo)
        {
            indexInfo = GetCacheIndexInfo(t);

            return(Vector3.Lerp(
                       this.Values[indexInfo.LowerIndex],
                       this.Values[indexInfo.UpperIndex],
                       indexInfo.PercentOfIndexes));
        }