mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 09:55:22 +02:00
Various random code cleanups
This commit is contained in:
@@ -33,6 +33,12 @@ public:
|
||||
explicit constexpr vector3d(T n) :
|
||||
X(n), Y(n), Z(n) {}
|
||||
|
||||
template <class U>
|
||||
constexpr static vector3d<T> from(const vector3d<U> &other)
|
||||
{
|
||||
return {static_cast<T>(other.X), static_cast<T>(other.Y), static_cast<T>(other.Z)};
|
||||
}
|
||||
|
||||
// operators
|
||||
|
||||
vector3d<T> operator-() const { return vector3d<T>(-X, -Y, -Z); }
|
||||
|
Reference in New Issue
Block a user