Skip to main content

positionUtil

An utility module for working with positions.

Functions

randomPosition

positionUtil.randomPosition(
positionVector3,
sizeVector3,
specifiedRandomRandom?
) → ()

Returns a random position from the given position and the size. A third argument (specifiedRandom) can be passed which will be used in calculating the random position.

Show raw api
{
    "functions": [
        {
            "name": "randomPosition",
            "desc": "Returns a random position from the given position and the size. A third argument (`specifiedRandom`)\ncan be passed which will be used in calculating the random position.",
            "params": [
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "size",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "specifiedRandom",
                    "desc": "",
                    "lua_type": "Random?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 15,
                "path": "src/positionUtil/init.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "positionUtil",
    "desc": "An utility module for working with positions.",
    "source": {
        "line": 6,
        "path": "src/positionUtil/init.luau"
    }
}