mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-31 18:31:04 +00:00
Support floating-point animation frame numbers
This commit is contained in:
parent
323fc0a798
commit
06907aa99b
22 changed files with 111 additions and 105 deletions
|
@ -38,6 +38,12 @@ public:
|
|||
explicit constexpr vector2d(const std::array<T, 2> &arr) :
|
||||
X(arr[0]), Y(arr[1]) {}
|
||||
|
||||
template <class U>
|
||||
constexpr static vector2d<T> from(const vector2d<U> &other)
|
||||
{
|
||||
return {static_cast<T>(other.X), static_cast<T>(other.Y)};
|
||||
}
|
||||
|
||||
// operators
|
||||
|
||||
vector2d<T> operator-() const { return vector2d<T>(-X, -Y); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue