mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-21 13:55:10 +00:00
vector are now proper struct, including conversion functions
This commit is contained in:
27
lib/Ray/sources/Vector/Vector2.cpp
Normal file
27
lib/Ray/sources/Vector/Vector2.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
** EPITECH PROJECT, 2021
|
||||
** Bomberman
|
||||
** File description:
|
||||
** Vector2
|
||||
*/
|
||||
|
||||
#include "Vector/Vector2.hpp"
|
||||
|
||||
RAY::Vector2::Vector2(float X, float Y):
|
||||
x(X), y(Y)
|
||||
{
|
||||
}
|
||||
|
||||
RAY::Vector2::Vector2():
|
||||
x(0), y(0)
|
||||
{
|
||||
}
|
||||
|
||||
RAY::Vector2::operator ::Vector2() const
|
||||
{
|
||||
::Vector2 v;
|
||||
|
||||
v.x = this->x;
|
||||
v.y = this->y;
|
||||
return v;
|
||||
}
|
||||
Reference in New Issue
Block a user