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

Function eval_perlin_3

library/LuaApi.cpp:1205–1210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1203 return 1;
1204}
1205static int eval_perlin_3(lua_State *L)
1206{
1207 auto &gen = *(PerlinNoise3D<float>*)lua_touserdata(L, lua_upvalueindex(1));
1208 lua_pushnumber(L, gen(luaL_checknumber(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)));
1209 return 1;
1210}
1211
1212static int dfhack_random_perlin(lua_State *L)
1213{

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