Craig Evans
/
ELEC2645_Pong2021
Pong game for ELEC1620 board.
Embed:
(wiki syntax)
Show/hide line numbers
Utils.h
00001 #ifndef UTILS_H 00002 #define UTILS_H 00003 00004 struct Position2D { 00005 int x; 00006 int y; 00007 }; 00008 00009 enum Direction { 00010 CENTRE, // 0 00011 N, // 1 00012 NE, // 2 00013 E, // 3 00014 SE, // 4 00015 S, // 5 00016 SW, // 6 00017 W, // 7 00018 NW // 8 00019 }; 00020 00021 struct UserInput { 00022 Direction d; 00023 float mag; 00024 }; 00025 00026 struct Vector2D { 00027 float x; 00028 float y; 00029 }; 00030 00031 struct Polar { 00032 float mag; 00033 float angle; 00034 }; 00035 00036 #endif
Generated on Thu Jul 14 2022 15:46:36 by 1.7.2