mirror of
https://github.com/ProgramSnail/snake_2024.git
synced 2025-12-23 22:58:44 +00:00
initial game
This commit is contained in:
parent
4570d6e593
commit
adabb50a9e
10 changed files with 200 additions and 132 deletions
|
|
@ -3,13 +3,13 @@
|
|||
#include <cmath>
|
||||
|
||||
template <typename T> struct Vec {
|
||||
T x;
|
||||
T y;
|
||||
T x = {};
|
||||
T y = {};
|
||||
|
||||
//
|
||||
|
||||
template <typename U> explicit operator Vec<U>() {
|
||||
return Vec<U>{.x = x, .y = y};
|
||||
return Vec<U>{.x = static_cast<U>(x), .y = static_cast<U>(y)};
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue