adding a true user-defined conversion operator

This commit is contained in:
Clément Le Bihan
2021-05-26 18:40:18 +02:00
parent 6bd7a46ea9
commit 07e2d5bc35
3 changed files with 5 additions and 4 deletions
+3 -1
View File
@@ -153,13 +153,15 @@ namespace BBM
{
return (point * this) / std::pow(this->magnitude(), 2) * this;
}
explicit operator RAY::Vector3() const { return {this->x, this->y, this->z };}
};
typedef Vector3<float> Vector3f;
typedef Vector3<unsigned> Vector3u;
typedef Vector3<int> Vector3i;
RAY::Vector3 operator*(const Vector3f &v);
}