#include "point3d.hpp"


void Point3d::affiche(void){
	std::cout << "{" << this->x << "," << this->y << "," << this->z << "}" << std::endl;
}

Point3d Point3d::operator+(const Point3d& other) const{
	Point3d res;
	res.x = this->x + other.x;
	res.y = this->y + other.y;
	res.z = this->z + other.z;
	return res;
}
Point3d Point3d::operator*(const Point3d& other) const {
	Point3d res;
	res.x = this->x * other.x;
	res.y = this->y * other.y;
	res.z = this->z * other.z;
	return res;
}
Point3d Point3d::operator-(const Point3d& other) const {
	Point3d res;
	res.x = this->x - other.x;
	res.y = this->y - other.y;
	res.z = this->z - other.z;
	return res;
}
Point3d Point3d::operator/(const Point3d& other) const {
	Point3d res;
	res.x = this->x / other.x;
	res.y = this->y / other.y;
	res.z = this->z / other.z;
	return res;
}

Point3d Point3d::operator*(const double t) const {
	Point3d res;
	res.x = this->x * t;
	res.y = this->y * t;
	res.z = this->z * t;
	return res;
}

Point3d Point3d::operator/(const double t) const {
	Point3d res;
	res.x = this->x / t;
	res.y = this->y / t;
	res.z = this->z / t;
	return res;
}

bool Point3d::operator==(const Point3d& other) const {
	return (this->x == other.x) && (this->y == other.y) && (this->z == other.z);
}
