Example #1
0
 point3d<T> point3d<T>::operator- (const point3d<T>& p) const
 {
   point3d<T> q;
   
   q.setX(this->x - p.getX());
   q.setY(this->y - p.getY());
   q.setZ(this->z - p.getZ());
   
   return q;
 }
Example #2
0
 point3d<T> point3d<T>::operator+ (const point3d<T>& p) const
 {
   point3d<T> q;
   
   q.setX(this->x + p.getX());
   q.setY(this->y + p.getY());
   q.setZ(this->z + p.getZ());
   
   return q;
 }
Example #3
0
 T point3d<T>::operator* (const point3d<T>& p) const
 {
   T r = this->x * p.getX() + this->y * p.getY();
   return r;
 }