Esempio n. 1
0
        //Векторное произведение трёхмерных векторов
        public override Vector3d vectorMultip(AbstractVector <Vector3d> vec)
        {
            double newX = this.getY() * vec.getZ() - this.getZ() * vec.getY();
            double newY = -(this.getX() * vec.getZ() - this.getZ() * vec.getX());
            double newZ = this.getX() * vec.getY() - this.getY() * vec.getX();

            return(new Vector3d(newX, newY, newZ));
        }
Esempio n. 2
0
 //Скалярное произведение трёхмерных векторов
 public override double scalarMultip(AbstractVector <Vector3d> vec)
 {
     return
         (this.getX() * vec.getX() +
          this.getY() * vec.getY() +
          this.getZ() * vec.getZ());
 }
Esempio n. 3
0
 //Вычитание трёхмерных векторов
 public override Vector3d subVec(AbstractVector <Vector3d> vec)
 {
     return(new Vector3d(
                this.getX() - vec.getX(),
                this.getY() - vec.getY(),
                this.getZ() - vec.getZ()
                ));
 }