sVector genValues() { setValues(); //print(CoM); //print(Dist); return(new sVector(CoM.x, CoM.y, CoM.z, Dist.get(0), Dist.get(1), Dist.get(2), Dist.get(3), Dist.get(4), Dist.get(5))); }
public void add(sVector other) { if (this.mag() == other.mag()) { for (int i = 0; i < this.mag(); i++) { vec[i] = vec[i] + other.get(i); } } }
public float dot(sVector other) { float ret = 0; if (this.mag() == other.mag()) { for (int i = 0; i < this.mag(); i++) { ret += this.get(i) * other.get(i); } } return(ret); }