MCPcopy Create free account
hub / github.com/DFHack/dfhack / eval_perlin_2

Function eval_perlin_2

library/LuaApi.cpp:1199–1204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197 return 1;
1198}
1199static int eval_perlin_2(lua_State *L)
1200{
1201 auto &gen = *(PerlinNoise2D<float>*)lua_touserdata(L, lua_upvalueindex(1));
1202 lua_pushnumber(L, gen(luaL_checknumber(L, 1), luaL_checknumber(L, 2)));
1203 return 1;
1204}
1205static int eval_perlin_3(lua_State *L)
1206{
1207 auto &gen = *(PerlinNoise3D<float>*)lua_touserdata(L, lua_upvalueindex(1));

Callers

nothing calls this directly

Calls 3

lua_touserdataFunction · 0.85
lua_pushnumberFunction · 0.85
luaL_checknumberFunction · 0.85

Tested by

no test coverage detected