Exemplo n.º 1
0
        public double InvLerp(IPoint2 p2, IPoint2 pLerp)
        {
            BuffVector2d v12 = new BuffVector2d();

            v12.Sub(p2, this);
            BuffVector2d v1Lerp = new BuffVector2d();

            v1Lerp.Sub(pLerp, this);
            return(v12.Proj(v1Lerp));
        }
Exemplo n.º 2
0
        public double InvLerp(IVector2 v2, IVector2 vLerp)
        {
            BuffVector2d v12 = new BuffVector2d(v2);

            v12.Sub(this);
            BuffVector2d v1Lerp = new BuffVector2d(vLerp);

            v1Lerp.Sub(this);
            return(v12.Proj(v1Lerp));
        }