//Векторное произведение трёхмерных векторов 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)); }
//Скалярное произведение трёхмерных векторов public override double scalarMultip(AbstractVector <Vector3d> vec) { return (this.getX() * vec.getX() + this.getY() * vec.getY() + this.getZ() * vec.getZ()); }
//Вычитание трёхмерных векторов public override Vector3d subVec(AbstractVector <Vector3d> vec) { return(new Vector3d( this.getX() - vec.getX(), this.getY() - vec.getY(), this.getZ() - vec.getZ() )); }