Ejemplo n.º 1
0
 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);
         }
     }
 }
Ejemplo n.º 2
0
    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);
    }