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); }