LiteLoaderBDS-1.16.40/LiteLoader/Header/MC/Vec2.hpp
2022-09-21 19:47:03 +08:00

42 lines
1.0 KiB
C++

// This Header is auto generated by BDSLiteLoader Toolchain
#pragma once
#define AUTO_GENERATED
#include "../Global.h"
#define BEFORE_EXTRA
#undef BEFORE_EXTRA
class Vec2 {
public:
float x, y;
Vec2(float a, float b) : x(a), y(b){};
inline std::string toString() const {
return std::to_string(x) + "," + std::to_string(y);
}
inline Vec2 operator*(float num) const {
return {x * num, y * num};
}
inline Vec2 operator+(const Vec2& b) const {
return {this->x + b.x, this->y + b.y};
}
inline Vec2 operator-(const Vec2& b) const {
return {this->x - b.x, this->y - b.y};
}
MCAPI static class Vec2 const LOWEST;
MCAPI static class Vec2 const MAX;
MCAPI static class Vec2 const MIN;
MCAPI static class Vec2 const NEG_UNIT_X;
MCAPI static class Vec2 const NEG_UNIT_Y;
MCAPI static class Vec2 const ONE;
MCAPI static class Vec2 const UNIT_X;
MCAPI static class Vec2 const UNIT_Y;
MCAPI static class Vec2 const ZERO;
};