Vector.h 388 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include "Header.h"
  3. class Vec3f
  4. {
  5. public:
  6. union
  7. {
  8. struct
  9. {
  10. float x, y, z;
  11. };
  12. float v[3];
  13. };
  14. Vec3f();
  15. Vec3f(Vec3f &other);
  16. Vec3f(float x, float y, float z);
  17. float& operator [](int);
  18. };
  19. class Vec2f
  20. {
  21. public:
  22. union
  23. {
  24. struct
  25. {
  26. float x, y;
  27. };
  28. float v[2];
  29. };
  30. Vec2f();
  31. Vec2f(float x, float y);
  32. Vec2f(Vec2f &other);
  33. float& operator [](int);
  34. };