Beispiel #1
0
 public avector cross_product(avector other)
 {
     this.x = this.y * other.z - this.z * other.y;
     this.y = this.z * other.x - this.x * other.y;
     this.z = this.x * other.y - this.y * other.x;
     return(this);
 }
Beispiel #2
0
 public avector sub(avector other)
 {
     this.x = this.x - other.x;
     this.y = this.y - other.y;
     this.z = this.z - other.z;
     return(this);
 }
Beispiel #3
0
 public avector add(avector other)
 {
     this.x = this.x + other.x;
     this.y = this.y + other.y;
     this.z = this.z + other.z;
     return(this);
 }
Beispiel #4
0
 public double dot_product(avector other)
 {
     return(this.x * other.x + this.y * other.y + this.z * other.z);
 }