Пример #1
0
edge::edge(vector2 a, vector2 uv_a, float z_a, vector2 b, vector2 uv_b, float z_b) {
	
	if (a.get_y() > b.get_y()) {
		this->a = b;
		this->uv_a = uv_b;
		this->b = a;
		this->uv_b = uv_a;
		this->z_b = z_a;
		this->z_a = z_b;
	}
	else {
		this->a = a;
		this->b = b;
		this->uv_a = uv_a;
		this->uv_b = uv_b;
		this->z_a = z_a;
		this->z_b = z_b;
	}
}
Пример #2
0
inline
bool operator ==(const vector2 &lhs, const vector2 &rhs) {
  return lhs.get_x() == rhs.get_x() && lhs.get_y() == rhs.get_y();
}