Skip to content

Luau vectors #140

Answered by khvzak
setzer22 asked this question in Q&A
Mar 29, 2022 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

The constructor indeed is not provided by Luau, you need to do something like:

    let globals = lua.globals();
    globals.set(
        "vector",
        lua.create_function(|_, (x, y, z)| Ok(Value::Vector(x, y, z)))?,
    )?;

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@khvzak
Comment options

@setzer22
Comment options

@khvzak
Comment options

@khvzak
Comment options

@setzer22
Comment options

Answer selected by setzer22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants