示例#1
0
 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)));
 }
示例#2
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);
         }
     }
 }
示例#3
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);
    }