71 this->v[0] = other.v[0];
72 this->v[1] = other.v[1];
73 this->v[2] = other.v[2];
76 Vector3(
float x,
float y,
float z){
89 this->v[0] = rhs.v[0];
90 this->v[1] = rhs.v[1];
91 this->v[2] = rhs.v[2];
97 v.v[0] = this->v[0] + rhs.v[0];
98 v.v[1] = this->v[1] + rhs.v[1];
99 v.v[2] = this->v[2] + rhs.v[2];
105 v.v[0] = this->v[0] - rhs.v[0];
106 v.v[1] = this->v[1] - rhs.v[1];
107 v.v[2] = this->v[2] - rhs.v[2];
114 v.v[0] = this->v[0]/n;
115 v.v[1] = this->v[1]/n;
116 v.v[2] = this->v[2]/n;
122 v.v[0] = this->v[0] * rhs.v[0];
123 v.v[1] = this->v[1] * rhs.v[1];
124 v.v[2] = this->v[2] * rhs.v[2];
128 printf(
"x=[%f], y=[%f], z=[%f]\n", v[0], v[1], v[2]);