12#ifndef MINESERVER_ANGLE_H
13#define MINESERVER_ANGLE_H
47 Angle(std::byte value) : value(value) {}
61 return ((
float)value) * 360.f / 256.f;
82 luabridge::getGlobalNamespace(state)
84 .beginClass<
Angle>(
"Angle")
Angle class holder.
Definition angle.hpp:25
Angle(std::byte value)
Construct a new Angle object from byte.
Definition angle.hpp:47
std::byte getByte() const
Get the Byte representation.
Definition angle.hpp:69
float getDegrees() const
Get the Degrees of the Angle.
Definition angle.hpp:59
static void loadLua(lua_State *state, const char *namespaceName)
Loads Angle to lua state.
Definition angle.hpp:80
Angle(float degrees)
Construct a new Angle object from degrees.
Definition angle.hpp:41
~Angle()=default
Destroy the Angle object.
Angle()
Construct a new Angle object.
Definition angle.hpp:35
constexpr std::string_view type_name()
Gets the name of the type paramater.
Definition event.h:56