Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
Angle Class Reference

Angle class holder. More...

#include <angle.hpp>

Public Member Functions

 Angle ()
 Construct a new Angle object.
 
 Angle (float degrees)
 Construct a new Angle object from degrees.
 
 Angle (std::byte value)
 Construct a new Angle object from byte.
 
 ~Angle ()=default
 Destroy the Angle object.
 
float getDegrees () const
 Get the Degrees of the Angle.
 
std::byte getByte () const
 Get the Byte representation.
 

Static Public Member Functions

static void loadLua (lua_State *state, const char *namespaceName)
 Loads Angle to lua state.
 

Detailed Description

Angle class holder.

Minecraft-way to hold angles as a single byte.

Constructor & Destructor Documentation

◆ Angle() [1/3]

Angle::Angle ( )
inline

Construct a new Angle object.

Angle is 0.

◆ Angle() [2/3]

Angle::Angle ( float degrees)
inline

Construct a new Angle object from degrees.

Parameters
degreesthe degrees of the angle

◆ Angle() [3/3]

Angle::Angle ( std::byte value)
inline

Construct a new Angle object from byte.

Parameters
valuethe byte value of the angle

Member Function Documentation

◆ getByte()

std::byte Angle::getByte ( ) const
inline

Get the Byte representation.

Returns
std::byte the angle as a byte

◆ getDegrees()

float Angle::getDegrees ( ) const
inline

Get the Degrees of the Angle.

Returns
float the degrees of the angle

◆ loadLua()

static void Angle::loadLua ( lua_State * state,
const char * namespaceName )
inlinestatic

Loads Angle to lua state.

Parameters
statelua state
namespaceNamebase namespace name

The documentation for this class was generated from the following file: