Exemplo n.º 1
0
        public void ProjectTo(IVector2 where)
        {
            BuffVector2d aux = new BuffVector2d(where);

            aux.ProjV(new Vector2d(this.x, this.y));
            this.Set(aux.X, aux.Y);
        }
Exemplo n.º 2
0
        public void ProjectTo(IPoint2 p1, IVector2 where)
        {
            ITuple2_Double _p1 = p1.AsTupleDouble();
            BuffVector2d   aux = new BuffVector2d(where);

            aux.ProjV(new Vector2d(_p1.X, _p1.Y));
            this.Set(aux.X, aux.Y);
        }
Exemplo n.º 3
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.º 4
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));
        }