mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 22:41:49 +00:00
fix mat4.rotate(...)
This commit is contained in:
parent
4fdfeb5e88
commit
0c8df834dd
1 changed files with 1 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ inline int l_rotate(lua::State* L) {
|
||||||
auto matrix = lua::tomat4(L, 1);
|
auto matrix = lua::tomat4(L, 1);
|
||||||
auto vec = lua::tovec3(L, 2);
|
auto vec = lua::tovec3(L, 2);
|
||||||
auto angle = glm::radians(static_cast<float>(lua::tonumber(L, 3)));
|
auto angle = glm::radians(static_cast<float>(lua::tonumber(L, 3)));
|
||||||
return lua::setmat4(L, 3, glm::rotate(matrix, angle, vec));
|
return lua::setmat4(L, 4, glm::rotate(matrix, angle, vec));
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
throw std::runtime_error("invalid arguments number (2, 3 or 4 expected)");
|
throw std::runtime_error("invalid arguments number (2, 3 or 4 expected)");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue