mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add vec2, vec3, vec4 libraries
This commit is contained in:
parent
6f618ae3ff
commit
5ede84edc7
5 changed files with 54 additions and 14 deletions
|
|
@ -60,9 +60,9 @@ static int l_mul(lua::State* L) {
|
|||
}
|
||||
case 3: {
|
||||
if (len2 == 4) {
|
||||
return lua::setvec4(L, 3, matrix1 * lua::tovec4(L, 2));
|
||||
return lua::setvec(L, 3, matrix1 * lua::tovec4(L, 2));
|
||||
} else if (len2 == 3) {
|
||||
return lua::setvec3(L, 3, matrix1 * glm::vec4(lua::tovec3(L, 2), 1.0f));
|
||||
return lua::setvec(L, 3, matrix1 * glm::vec4(lua::tovec3(L, 2), 1.0f));
|
||||
}
|
||||
return lua::setmat4(L, 3, matrix1 * lua::tomat4(L, 2));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue