public List <Vector3> CurvedNonuniform(List <Vector3> path)
        {
            if (this.maxSegmentLength <= 0f)
            {
                Debug.LogWarning("Max Segment Length is <= 0 which would cause DivByZero-exception or other nasty errors (avoid this)");
                return(path);
            }
            int num = 0;

            for (int i = 0; i < path.Count - 1; i++)
            {
                float magnitude = (path[i] - path[i + 1]).magnitude;
                for (float num2 = 0f; num2 <= magnitude; num2 += this.maxSegmentLength)
                {
                    num++;
                }
            }
            List <Vector3> list = ListPool <Vector3> .Claim(num);

            Vector3 vector = (path[1] - path[0]).normalized;

            for (int j = 0; j < path.Count - 1; j++)
            {
                float   magnitude2 = (path[j] - path[j + 1]).magnitude;
                Vector3 a          = vector;
                Vector3 vector2    = (j >= path.Count - 2) ? (path[j + 1] - path[j]).normalized : ((path[j + 2] - path[j + 1]).normalized - (path[j] - path[j + 1]).normalized).normalized;
                Vector3 tan        = a * magnitude2 * this.factor;
                Vector3 tan2       = vector2 * magnitude2 * this.factor;
                Vector3 a2         = path[j];
                Vector3 b          = path[j + 1];
                float   num3       = 1f / magnitude2;
                for (float num4 = 0f; num4 <= magnitude2; num4 += this.maxSegmentLength)
                {
                    float t = num4 * num3;
                    list.Add(SimpleSmoothModifier.GetPointOnCubic(a2, b, tan, tan2, t));
                }
                vector = vector2;
            }
            list[list.Count - 1] = path[path.Count - 1];
            return(list);
        }