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

Function eval_perlin_1

library/LuaApi.cpp:1193–1198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1191}
1192
1193static int eval_perlin_1(lua_State *L)
1194{
1195 auto &gen = *(PerlinNoise1D<float>*)lua_touserdata(L, lua_upvalueindex(1));
1196 lua_pushnumber(L, gen(luaL_checknumber(L, 1)));
1197 return 1;
1198}
1199static int eval_perlin_2(lua_State *L)
1200{
1201 auto &gen = *(PerlinNoise2D<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