Exemplo n.º 1
0
        public IVector2 Mul(IVector2 v)
        {
            ITuple2_Double _v = v.AsTupleDouble();

            return(new Vector2d(this.M00 * _v.X + this.M01 * _v.Y,
                                this.M10 * _v.X + this.M11 * _v.Y));
        }
Exemplo n.º 2
0
        public void Lineal(IVector2 v2, double alpha, double beta)
        {
            ITuple2_Double _v2 = v2.AsTupleDouble();

            this.Set(alpha * this.x + beta * _v2.X,
                     alpha * this.y + beta * _v2.Y);
        }
Exemplo n.º 3
0
        public void Sub(IVector2 v1, IVector2 v2)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();
            ITuple2_Double _v2 = v2.AsTupleDouble();

            this.Set(_v1.X - _v2.X, _v1.Y - _v2.Y);
        }
Exemplo n.º 4
0
        public override void Transform(IVector2 v, IOpVector2 vout)
        {
            ITuple2_Double   _v    = v.AsTupleDouble();
            IOpTuple2_Double _vout = vout.AsOpTupleDouble();

            _vout.Set(_v.X, _v.Y);
        }
Exemplo n.º 5
0
        public BuffVector2d(IVector2 other)
        {
            ITuple2_Double _other = other.AsTupleDouble();

            this.x = _other.X;
            this.y = _other.Y;
        }
Exemplo n.º 6
0
        public void Sub(IPoint2 p, IVector2 v)
        {
            ITuple2_Double _p = p.AsTupleDouble();
            ITuple2_Double _v = v.AsTupleDouble();

            this.Set(_p.X - _v.X, _p.Y - _v.Y);
        }
Exemplo n.º 7
0
        public Vector2d(IVector2 v)
        {
            ITuple2_Double _v = v.AsTupleDouble();

            this.X = _v.X;
            this.Y = _v.Y;
        }
Exemplo n.º 8
0
        public void SimpleMul(IVector2 v1, IVector2 v2)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();
            ITuple2_Double _v2 = v2.AsTupleDouble();

            this.Set(_v1.X * _v2.X, _v1.Y * _v2.Y);
        }
Exemplo n.º 9
0
        public void Mul(IVector2 v, IOpVector2 vout)
        {
            ITuple2_Double   _v    = v.AsTupleDouble();
            IOpTuple2_Double _vout = vout.AsOpTupleDouble();

            _vout.Set(this.M00 * _v.X + this.M01 * _v.Y,
                      this.M10 * _v.X + this.M11 * _v.Y);
        }
Exemplo n.º 10
0
        public void Lineal(IVector2 v1, IVector2 v2, double alpha, double beta)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();
            ITuple2_Double _v2 = v2.AsTupleDouble();

            this.Set(alpha * _v1.X + beta * _v2.X,
                     alpha * _v1.Y + beta * _v2.Y);
        }
Exemplo n.º 11
0
        public double Dot(IVector2 v2)
        {
            ITuple2_Double _v2 = v2.AsTupleDouble();

            return(this.X * _v2.X + this.Y * _v2.Y);
        }
Exemplo n.º 12
0
        public bool Equals(IVector2 other)
        {
            ITuple2_Double _other = other.AsTupleDouble();

            return(this.Equals(_other.X, _other.Y));
        }
Exemplo n.º 13
0
        public bool EpsilonEquals(IVector2 other, double epsilon = EPSILON)
        {
            ITuple2_Double _other = other.AsTupleDouble();

            return(this.EpsilonEquals(_other.X, _other.Y, epsilon));
        }
Exemplo n.º 14
0
        public void Add(IVector2 v2)
        {
            ITuple2_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x + _v2.X, this.y + _v2.Y);
        }
Exemplo n.º 15
0
        public void PerpLeft(IVector2 v1)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();

            this.Set(-_v1.Y, _v1.X);
        }
Exemplo n.º 16
0
        public void PerpRight(IVector2 v1)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();

            this.Set(_v1.Y, -_v1.X);
        }
Exemplo n.º 17
0
        public void Sub(IVector2 v2)
        {
            ITuple2_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x - _v2.X, this.y - _v2.Y);
        }
Exemplo n.º 18
0
        public void Sub(IVector2 v)
        {
            ITuple2_Double _v = v.AsTupleDouble();

            this.Set(this.x - _v.X, this.y - _v.Y);
        }
Exemplo n.º 19
0
        public void Mul(IVector2 v1, double c)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();

            this.Set(_v1.X * c, _v1.Y * c);
        }
Exemplo n.º 20
0
        public void Div(IVector2 v1, double c)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();

            this.Set(_v1.X / c, _v1.Y / c);
        }
Exemplo n.º 21
0
        public void SimpleMul(IVector2 v2)
        {
            ITuple2_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x * _v2.X, this.y * _v2.Y);
        }
Exemplo n.º 22
0
        public double Cross(IVector2 v2)
        {
            ITuple2_Double _v2 = v2.AsTupleDouble();

            return(this.X * _v2.Y - this.Y * _v2.X);
        }
Exemplo n.º 23
0
        public void Neg(IVector2 v1)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();

            this.Set(-_v1.X, -_v1.Y);
        }
Exemplo n.º 24
0
        public void Abs(IVector2 v1)
        {
            ITuple2_Double _v1 = v1.AsTupleDouble();

            this.Set(Math.Abs(_v1.X), Math.Abs(_v1.Y));
        }
Exemplo n.º 25
0
        public void Add(IVector2 v)
        {
            ITuple2_Double _v = v.AsTupleDouble();

            this.Set(this.x + _v.X, this.y + _v.Y);
        }