Beispiel #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;
 }
Beispiel #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;
 }