1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00
This commit is contained in:
Lars Mueller 2025-05-29 02:13:52 +02:00
parent 513532a93c
commit f7067644a3
8 changed files with 107 additions and 92 deletions

View file

@ -4,7 +4,6 @@
#pragma once
#include <cmath>
#include <string_view>
extern "C" {
@ -25,11 +24,12 @@ protected:
template <typename T>
static T readParam(lua_State *L, int index);
/// Type to represent a restriction to finite floats
template<typename T>
struct Finite {
T value;
};
/**
* @brief Read a value, but restrict to finite floats.
* @see readParam
*/
template <typename T>
static T readFiniteParam(lua_State *L, int index);
/**
* Read a value using a template type T from Lua state L at index