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; }
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; }
T point3d<T>::operator* (const point3d<T>& p) const { T r = this->x * p.getX() + this->y * p.getY(); return r; }